Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os-02: Fix for SUSE environments #70

Merged
merged 1 commit into from
Jun 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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