mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Default profiles to be chroot relative
Due to changes in path looks and the work going forward default profiles to resolve relative to the chroot instead of the namespace. This will only affect profiles that are used on tasks within a chroot. For now it will be possible to get the old default namespace relative behavior by passing the namespace_relative flag to the profile eg. profile /example (namespace_relative) { .. } Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Kees Cook <kees@ubuntu.com>
This commit is contained in:
parent
93cd01d7e6
commit
a5640ec89c
1 changed files with 4 additions and 0 deletions
|
@ -418,6 +418,10 @@ flagvals: flagvals flagval
|
|||
(PATH_CHROOT_REL | PATH_NS_REL))
|
||||
yyerror(_("Profile flag chroot_relative conflicts with namespace_relative"));
|
||||
|
||||
if (!($1.path & PATH_NS_REL))
|
||||
/* default to chroot relative profiles */
|
||||
$1.path |= PATH_CHROOT_REL;
|
||||
|
||||
if (($1.path & (PATH_MEDIATE_DELETED | PATH_DELEGATE_DELETED)) ==
|
||||
(PATH_MEDIATE_DELETED | PATH_DELEGATE_DELETED))
|
||||
yyerror(_("Profile flag mediate_deleted conflicts with delegate_deleted"));
|
||||
|
|
Loading…
Add table
Reference in a new issue