mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 23:43:56 +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
|
@{exec_path} = @{bin}/chsh
|
||||||
profile chsh @{exec_path} {
|
profile chsh @{exec_path} {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/wutmp>
|
|
||||||
include <abstractions/authentication>
|
include <abstractions/authentication>
|
||||||
include <abstractions/nameservice-strict>
|
include <abstractions/nameservice-strict>
|
||||||
|
include <abstractions/wutmp>
|
||||||
|
|
||||||
# To write records to the kernel auditing log.
|
|
||||||
capability audit_write,
|
capability audit_write,
|
||||||
|
|
||||||
# To set the right permission to the files in the /etc/ dir.
|
|
||||||
capability chown,
|
capability chown,
|
||||||
capability fsetid,
|
capability fsetid,
|
||||||
|
|
||||||
# gpasswd is a SETUID binary
|
|
||||||
capability setuid,
|
capability setuid,
|
||||||
|
|
||||||
network netlink raw,
|
network netlink raw,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
owner @{PROC}/@{pid}/loginuid r,
|
|
||||||
|
|
||||||
/etc/shells r,
|
/etc/shells r,
|
||||||
|
|
||||||
/etc/passwd rw,
|
/etc/passwd rw,
|
||||||
@ -44,6 +37,8 @@ profile chsh @{exec_path} {
|
|||||||
# modify the /etc/passwd or /etc/shadow password database.
|
# modify the /etc/passwd or /etc/shadow password database.
|
||||||
/etc/.pwd.lock rwk,
|
/etc/.pwd.lock rwk,
|
||||||
|
|
||||||
|
owner @{PROC}/@{pid}/loginuid r,
|
||||||
|
|
||||||
include if exists <local/chsh>
|
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
|
# To create user dirs and copy files from /etc/skel/ to them
|
||||||
@{HOME}/ rw,
|
@{HOME}/ rw,
|
||||||
@{HOME}/.* w,
|
@{HOME}/.** w,
|
||||||
/var/lib/*/{,*} rw,
|
/var/lib/*/{,*} rw,
|
||||||
/etc/skel/{,.*} r,
|
/etc/skel/{,.**} r,
|
||||||
|
|
||||||
profile pam_tally2 {
|
profile pam_tally2 {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
@ -11,7 +11,7 @@ setup_file() {
|
|||||||
|
|
||||||
# bats test_tags=chsh
|
# bats test_tags=chsh
|
||||||
@test "chsh: [l]ist available shells" {
|
@test "chsh: [l]ist available shells" {
|
||||||
chsh --list-shells
|
chsh --list-shells || true
|
||||||
aa_check
|
aa_check
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,18 +11,18 @@ setup_file() {
|
|||||||
|
|
||||||
# bats test_tags=lsusb
|
# bats test_tags=lsusb
|
||||||
@test "lsusb: List all the USB devices available" {
|
@test "lsusb: List all the USB devices available" {
|
||||||
lsusb
|
lsusb || true
|
||||||
aa_check
|
aa_check
|
||||||
}
|
}
|
||||||
|
|
||||||
# bats test_tags=lsusb
|
# bats test_tags=lsusb
|
||||||
@test "lsusb: List the USB hierarchy as a tree" {
|
@test "lsusb: List the USB hierarchy as a tree" {
|
||||||
lsusb -t
|
lsusb -t || true
|
||||||
aa_check
|
aa_check
|
||||||
}
|
}
|
||||||
|
|
||||||
# bats test_tags=lsusb
|
# bats test_tags=lsusb
|
||||||
@test "lsusb: List verbose information about USB devices" {
|
@test "lsusb: List verbose information about USB devices" {
|
||||||
lsusb --verbose
|
lsusb --verbose || true
|
||||||
aa_check
|
aa_check
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user