]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
apparmor: support lxc.ttydir when bind-mounting ptys
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 29 Jan 2015 23:50:41 +0000 (23:50 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 30 Jan 2015 00:02:06 +0000 (01:02 +0100)
Because we now create the ttys from inside the container, we had to
add an apparmor rule for start-container to bind-mount /dev/pts/** -> /dev/tty*/.
However that's not sufficient if the container sets lxc.ttydir, in
which case we need to support mounting onto files in subdirs of /dev.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
config/apparmor/abstractions/start-container

index 0d02379dcd0b30e3c259ddb1b16c23183f981e84..b06a84d3b66ec3d64091e8f30f247fc77feebc6c 100644 (file)
@@ -13,7 +13,7 @@
   mount -> /usr/lib/lxc/{**,},
   mount fstype=devpts -> /dev/pts/,
   mount options=bind /dev/pts/ptmx/ -> /dev/ptmx/,
-  mount options=bind /dev/pts/** -> /dev/tty*/,
+  mount options=bind /dev/pts/** -> /dev/**,
   mount options=(rw, make-slave) -> **,
   mount fstype=debugfs,
   # allow pre-mount hooks to stage mounts under /var/lib/lxc/<container>/