Skip to content

Commit

Permalink
incusd/apparmor: Allow more mounts in unprivileged containers
Browse files Browse the repository at this point in the history
As AppArmor is slowly getting worse and worse at handling mounts due to
its design failing to accomodate the new mount APIs, we have to keep
relaxing mount rules.

This is another one of those which is required for recent systemd systems.

Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Jan 29, 2024
1 parent 59dfb7e commit 02bd1a7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/server/apparmor/instance_lxc.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,12 @@ profile "{{ .name }}" flags=(attach_disconnected,mediate_deleted) {
mount options=(rw,unbindable) -> **,
mount options=(rw,runbindable) -> **,
# Allow all bind-mounts
mount options=(rw,bind) / -> /**,
mount options=(rw,bind) /** -> /**,
mount options=(rw,rbind) / -> /**,
mount options=(rw,rbind) /** -> /**,
# Allow all bind-mounts.
mount options=(rw,bind) -> /**,
mount options=(rw,rbind) -> /**,
# Allow all move-mounts.
mount options=(rw,move) -> /**,
# Allow common combinations of bind/remount
# NOTE: AppArmor bug effectively turns those into wildcards mount allow
Expand Down

0 comments on commit 02bd1a7

Please sign in to comment.