mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 15:33:47 +01:00
fix(test): minor fixes.
This commit is contained in:
parent
449c8d3e3a
commit
5240dcbdd1
@ -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>
|
||||
}
|
||||
|
||||
|
@ -53,9 +53,9 @@ profile useradd @{exec_path} {
|
||||
|
||||
# To create user dirs and copy files from /etc/skel/ to them
|
||||
@{HOME}/ rw,
|
||||
@{HOME}/.* w,
|
||||
@{HOME}/.** w,
|
||||
/var/lib/*/{,*} rw,
|
||||
/etc/skel/{,.*} r,
|
||||
/etc/skel/{,.**} r,
|
||||
|
||||
profile pam_tally2 {
|
||||
include <abstractions/base>
|
||||
|
@ -11,7 +11,7 @@ setup_file() {
|
||||
|
||||
# bats test_tags=chsh
|
||||
@test "chsh: [l]ist available shells" {
|
||||
chsh --list-shells
|
||||
chsh --list-shells || true
|
||||
aa_check
|
||||
}
|
||||
|
||||
|
@ -11,18 +11,18 @@ setup_file() {
|
||||
|
||||
# bats test_tags=lsusb
|
||||
@test "lsusb: List all the USB devices available" {
|
||||
lsusb
|
||||
lsusb || true
|
||||
aa_check
|
||||
}
|
||||
|
||||
# bats test_tags=lsusb
|
||||
@test "lsusb: List the USB hierarchy as a tree" {
|
||||
lsusb -t
|
||||
lsusb -t || true
|
||||
aa_check
|
||||
}
|
||||
|
||||
# bats test_tags=lsusb
|
||||
@test "lsusb: List verbose information about USB devices" {
|
||||
lsusb --verbose
|
||||
lsusb --verbose || true
|
||||
aa_check
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user