mirror of
https://github.com/inspec/inspec
synced 2024-11-27 15:10:44 +00:00
23 lines
471 B
Ruby
23 lines
471 B
Ruby
# encoding: utf-8
|
|
|
|
root_group = 'root'
|
|
|
|
if os[:family] == 'aix'
|
|
root_group = 'system'
|
|
elsif os[:family] == 'freebsd'
|
|
root_group = 'wheel'
|
|
elsif os.solaris?
|
|
root_group = 'sys'
|
|
end
|
|
|
|
if os.unix?
|
|
describe etc_group do
|
|
its('gids') { should_not contain_duplicates }
|
|
its('groups') { should include root_group }
|
|
its('users') { should include 'root' }
|
|
end
|
|
|
|
describe etc_group.where(name: root_group) do
|
|
its('users') { should include 'root' }
|
|
end
|
|
end
|