mirror of
https://github.com/inspec/inspec
synced 2024-12-22 11:03:11 +00:00
47eabbb221
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
59 lines
1.1 KiB
Ruby
59 lines
1.1 KiB
Ruby
# encoding: utf-8
|
|
|
|
# test root group on linux
|
|
if os.linux?
|
|
describe group('root') do
|
|
it { should exist }
|
|
its('gid') { should eq 0 }
|
|
end
|
|
|
|
describe group('noroot') do
|
|
it { should_not exist }
|
|
its('gid') { should eq nil }
|
|
end
|
|
elsif os[:family] == 'freebsd'
|
|
describe group('wheel') do
|
|
it { should exist }
|
|
its('gid') { should eq 0 }
|
|
end
|
|
|
|
describe group('root') do
|
|
it { should_not exist }
|
|
its('gid') { should eq nil }
|
|
end
|
|
|
|
describe group('noroot') do
|
|
it { should_not exist }
|
|
its('gid') { should eq nil }
|
|
end
|
|
elsif os[:family] == 'aix'
|
|
describe group('system') do
|
|
it { should exist }
|
|
its('gid') { should eq 0 }
|
|
end
|
|
|
|
describe group('bin') do
|
|
it { should exist }
|
|
its('gid') { should eq 2 }
|
|
end
|
|
|
|
describe group('noroot') do
|
|
it { should_not exist }
|
|
its('gid') { should eq nil }
|
|
end
|
|
elsif os.solaris?
|
|
describe group('root') do
|
|
it { should exist }
|
|
its('gid') { should eq 0 }
|
|
end
|
|
|
|
describe group('bin') do
|
|
it { should exist }
|
|
its('gid') { should eq 2 }
|
|
end
|
|
|
|
describe group('noroot') do
|
|
it { should_not exist }
|
|
its('gid') { should eq nil }
|
|
end
|
|
end
|