mirror of
https://github.com/inspec/inspec
synced 2024-12-23 03:23:27 +00:00
4b3095dac2
Remove container setup that comes for free with the dokken containers now Use the new openssl resource names Remove all the encoding statements that even rubocop doesn't recommend anymore Remove some compatibility with centos-5 and ubuntu 15.10 Signed-off-by: Tim Smith <tsmith@chef.io>
49 lines
1.1 KiB
Ruby
49 lines
1.1 KiB
Ruby
# author: Christoph Hartmann
|
|
# author: Dominik Richter
|
|
#
|
|
# prepares a sample file for verification
|
|
|
|
if node['platform_family'] != 'windows'
|
|
file '/tmp/file' do
|
|
mode '0765'
|
|
content 'hello world'
|
|
end
|
|
|
|
file '/tmp/sfile' do
|
|
mode '7765'
|
|
content 'hello suid/sgid/sticky'
|
|
end
|
|
|
|
directory '/tmp/folder' do
|
|
mode '0567'
|
|
end
|
|
|
|
else
|
|
|
|
user 'TestUser' do
|
|
password 'p@ssw0rd'
|
|
end
|
|
|
|
directory 'C:\Test Directory' do
|
|
rights :read, 'Administrators'
|
|
rights :read_execute, 'Administrators'
|
|
rights :write, 'Administrators'
|
|
rights :modify, 'Administrators'
|
|
rights :full_control, 'Administrators', :applies_to_children => true
|
|
deny_rights :read, 'TestUser'
|
|
deny_rights :write, 'TestUser'
|
|
deny_rights :read_execute, 'TestUser'
|
|
end
|
|
|
|
file 'C:\Test Directory\test file.txt' do
|
|
rights :read, 'Administrators'
|
|
rights :read_execute, 'Administrators'
|
|
rights :write, 'Administrators'
|
|
rights :modify, 'Administrators'
|
|
rights :full_control, 'Administrators'
|
|
deny_rights :read, 'TestUser'
|
|
deny_rights :write, 'TestUser'
|
|
deny_rights :read_execute, 'TestUser'
|
|
end
|
|
|
|
end
|