File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121login_defs_passmaxdays = attribute ( 'login_defs_passmaxdays' , default : '60' , description : 'Default password maxdays to set in login.defs' )
2222login_defs_passmindays = attribute ( 'login_defs_passmindays' , default : '7' , description : 'Default password mindays to set in login.defs' )
2323login_defs_passwarnage = attribute ( 'login_defs_passwarnage' , default : '7' , description : 'Default password warnage (days) to set in login.defs' )
24- if os . redhat?
25- shadow_group = 'root'
26- elsif os . debian?
27- shadow_group = 'shadow'
28- end
24+ shadow_group = 'root'
25+ shadow_group = 'shadow' if os . debian? || os . suse?
2926blacklist = attribute (
3027 'blacklist' ,
3128 default : [
9996 it { should be_readable . by ( 'owner' ) }
10097 it { should_not be_readable . by ( 'other' ) }
10198 end
102- if os . redhat ?
99+ if os . debian? || os . suse ?
103100 describe file ( '/etc/shadow' ) do
104- it { should_not be_readable . by ( 'group' ) }
101+ it { should be_readable . by ( 'group' ) }
105102 end
106- elsif os . debian?
103+ else
107104 describe file ( '/etc/shadow' ) do
108- it { should be_readable . by ( 'group' ) }
105+ it { should_not be_readable . by ( 'group' ) }
109106 end
110107 end
111108end
You can’t perform that action at this time.
0 commit comments