fix: allow passwd-, group- and shadow- debian default permissions (#149)

This commit is contained in:
GoldenKiwi
2022-03-18 16:41:49 +01:00
committed by GitHub
parent 33964c0a3d
commit ad5c71c3ce
6 changed files with 27 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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