Skip to content

Commit

Permalink
os-02: Fix for SUSE environments
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Geiger <michael.geiger@telekom.de>
  • Loading branch information
mcgege committed Jun 27, 2017
1 parent 21b6d82 commit c310414
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions controls/os_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@
login_defs_passmaxdays = attribute('login_defs_passmaxdays', default: '60', description: 'Default password maxdays to set in login.defs')
login_defs_passmindays = attribute('login_defs_passmindays', default: '7', description: 'Default password mindays to set in login.defs')
login_defs_passwarnage = attribute('login_defs_passwarnage', default: '7', description: 'Default password warnage (days) to set in login.defs')
if os.redhat?
shadow_group = 'root'
elsif os.debian?
shadow_group = 'shadow'
end
shadow_group = 'root'
shadow_group = 'shadow' if os.debian? || os.suse?
blacklist = attribute(
'blacklist',
default: [
Expand Down Expand Up @@ -99,13 +96,13 @@
it { should be_readable.by('owner') }
it { should_not be_readable.by('other') }
end
if os.redhat?
if os.debian? || os.suse?
describe file('/etc/shadow') do
it { should_not be_readable.by('group') }
it { should be_readable.by('group') }
end
elsif os.debian?
else
describe file('/etc/shadow') do
it { should be_readable.by('group') }
it { should_not be_readable.by('group') }
end
end
end
Expand Down

0 comments on commit c310414

Please sign in to comment.