mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00

... and save rules at the right place (ProfileList) where they actually get written when writing the profile. This is also a bugfix - the previous code saved boolean variables at a wrong place, and they were silently lost when writing the profile. Extend cleanprof_test.{in,out} to ensure that this doesn't break again. Also remove boolean_bad_[2-4] from the test-parser-simple-tests.py exception_not_raised list because these test profiles now get correctly detected as invalid.
64 lines
1 KiB
Text
64 lines
1 KiB
Text
abi <abi/4.19>,
|
|
|
|
alias /foo -> /bar,
|
|
|
|
include <tunables/global>
|
|
include if exists <tunables/nothing>
|
|
|
|
@{xy} = x y
|
|
@{asdf} = "" foo
|
|
|
|
$foo = false
|
|
$bar = true
|
|
|
|
# A simple test comment which will persist
|
|
|
|
|
|
/usr/bin/a/simple/cleanprof/test/profile {
|
|
abi "abi/4.20",
|
|
|
|
include <abstractions/base>
|
|
include if exists <foo>
|
|
|
|
set rlimit nofile <= 256,
|
|
|
|
audit capability,
|
|
|
|
network stream,
|
|
|
|
dbus send bus=session,
|
|
|
|
mount options=(rw,suid) /c -> /3,
|
|
|
|
signal set=(abrt alrm bus chld fpe hup ill int kill pipe quit segv stkflt term trap usr1 usr2),
|
|
|
|
pivot_root oldroot=/mnt/root/old/,
|
|
|
|
unix (receive) type=dgram,
|
|
unix shutdown addr=@HypotheticalServiceDaemon,
|
|
|
|
deny owner link /some/thing -> /foo/bar,
|
|
|
|
allow /home/*/** r,
|
|
allow /home/foo/** w,
|
|
link subset /alpha/beta -> /tmp/**,
|
|
|
|
change_profile,
|
|
|
|
|
|
^foo {
|
|
capability dac_override,
|
|
|
|
/etc/fstab r,
|
|
|
|
}
|
|
}
|
|
/usr/bin/other/cleanprof/test/profile {
|
|
allow /home/*/** rw,
|
|
allow /home/foo/bar r,
|
|
|
|
}
|
|
/what/ever/xattr xattrs=( foo=bar ) flags=( complain ) {
|
|
/what/ever r,
|
|
|
|
}
|