Skip to content

Commit e3bdd66

Browse files
committed
Merge pull request #17 from atomic111/master
added additional test
2 parents ebe8e86 + 2de4db3 commit e3bdd66

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

default/serverspec/sysctl_spec.rb

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,43 @@
207207
its(:value) { should eq 2 }
208208
end
209209
end
210+
211+
# GIS: Req 3.21-4
212+
describe command('find / -name \'.rhosts\' | wc -l ') do
213+
its(:stdout) { should match(/^0/) }
214+
end
215+
216+
# GIS: Req 3.21-4
217+
describe command('find / -name \'hosts.equiv\' | wc -l ') do
218+
its(:stdout) { should match(/^0/) }
219+
end
220+
221+
# GIS: Req 3.21-7
222+
describe file('/etc/shadow') do
223+
it { should be_owned_by 'root' }
224+
end
225+
226+
# GIS: Req 3.21-7
227+
describe file('/etc/shadow') do
228+
it { should be_mode 600 }
229+
end
230+
231+
# GIS: Req 3.21-8
232+
describe command('echo $PATH | grep -ci \'\.\'') do
233+
its(:stdout) { should match(/^0/) }
234+
end
235+
236+
# GIS: Req 3.21-8
237+
describe file('/etc/login.defs') do
238+
its(:content) { should match(%r{^ENV_SUPATH\s+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin}) }
239+
end
240+
241+
# GIS: Req 3.21-8
242+
describe file('/etc/login.defs') do
243+
its(:content) { should match(%r{^ENV_PATH\s+PATH=/usr/local/bin:/usr/bin:/bin}) }
244+
end
245+
246+
# GIS: Req 3.21-10
247+
describe file('/etc/login.defs') do
248+
its(:content) { should match(/^UMASK +027/) }
249+
end

0 commit comments

Comments
 (0)