mirror of
https://github.com/ovh/debian-cis.git
synced 2025-06-21 18:23:42 +02:00
fix: allow passwd-, group- and shadow- debian default permissions (#149)
This commit is contained in:
@ -10,6 +10,13 @@ test_audit() {
|
||||
local test_user="testetcpasswd-user"
|
||||
local test_file="/etc/passwd-"
|
||||
|
||||
describe Debian default right shall be accepted
|
||||
chmod 644 "$test_file"
|
||||
chown root:root "$test_file"
|
||||
register_test retvalshouldbe 0
|
||||
register_test contain "has correct permissions"
|
||||
run resolved /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
describe Tests purposely failing
|
||||
chmod 777 "$test_file"
|
||||
register_test retvalshouldbe 1
|
||||
|
@ -10,6 +10,13 @@ test_audit() {
|
||||
local test_user="testetcshadow-user"
|
||||
local test_file="/etc/shadow-"
|
||||
|
||||
describe Debian default right shall be accepted
|
||||
chmod 640 "$test_file"
|
||||
chown root:shadow "$test_file"
|
||||
register_test retvalshouldbe 0
|
||||
register_test contain "has correct permissions"
|
||||
run resolved /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
describe Tests purposely failing
|
||||
chmod 777 "$test_file"
|
||||
register_test retvalshouldbe 1
|
||||
|
@ -10,6 +10,13 @@ test_audit() {
|
||||
local test_user="testetcgroup--user"
|
||||
local test_file="/etc/group-"
|
||||
|
||||
describe Debian default right shall be accepted
|
||||
chmod 644 "$test_file"
|
||||
chown root:root "$test_file"
|
||||
register_test retvalshouldbe 0
|
||||
register_test contain "has correct permissions"
|
||||
run resolved /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
describe Tests purposely failing
|
||||
chmod 777 "$test_file"
|
||||
register_test retvalshouldbe 1
|
||||
|
Reference in New Issue
Block a user