mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
32 lines
489 B
Text
32 lines
489 B
Text
#=DESCRIPTION basic conditional statements w/hats
|
|
#=EXRESULT PASS
|
|
|
|
$FOO=true
|
|
$BAR = False
|
|
|
|
/bin/true {
|
|
/bin/false rix,
|
|
capability net_raw,
|
|
if ${FOO} {
|
|
capability ipc_lock,
|
|
^hat1 {
|
|
/usr/bin/sendmail rix,
|
|
if not $BAR {
|
|
/usr/sbin/sshd rix,
|
|
}
|
|
}
|
|
}
|
|
/bin/true rix,
|
|
if ${BAR} {
|
|
capability sys_admin,
|
|
/etc/shadow rw,
|
|
^hat2 {
|
|
/usr/bin/passwd rix,
|
|
}
|
|
}
|
|
/bin/sh rix,
|
|
capability dac_override,
|
|
^hat3 {
|
|
/tmp/** rw,
|
|
}
|
|
}
|