fix(test): minor fixes.

This commit is contained in:
Alexandre Pujol 2024-10-22 13:38:42 +01:00
parent 449c8d3e3a
commit 5240dcbdd1
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
4 changed files with 9 additions and 14 deletions

View file

@ -10,26 +10,19 @@ include <tunables/global>
@{exec_path} = @{bin}/chsh
profile chsh @{exec_path} {
include <abstractions/base>
include <abstractions/wutmp>
include <abstractions/authentication>
include <abstractions/nameservice-strict>
include <abstractions/wutmp>
# To write records to the kernel auditing log.
capability audit_write,
# To set the right permission to the files in the /etc/ dir.
capability chown,
capability fsetid,
# gpasswd is a SETUID binary
capability setuid,
network netlink raw,
@{exec_path} mr,
owner @{PROC}/@{pid}/loginuid r,
/etc/shells r,
/etc/passwd rw,
@ -44,6 +37,8 @@ profile chsh @{exec_path} {
# modify the /etc/passwd or /etc/shadow password database.
/etc/.pwd.lock rwk,
owner @{PROC}/@{pid}/loginuid r,
include if exists <local/chsh>
}