[apparmor] patch: fix remount with bind

John Johansen john.johansen at canonical.com
Fri Sep 11 10:36:07 UTC 2015


The parser is incorrectly screening off the bind flags on remount. The
following patch by Ash Wilson fixes this issue

BugLink: http://bugs.launchpad.net/bugs/1272028

Signed-off-by: Ash Wilson
Acked-by: John Johansen <john.johansen at canonical.com>

=== modified file 'parser/mount.h'
--- parser/mount.h	2014-12-12 14:21:25 +0000
+++ parser/mount.h	2015-09-04 17:54:04 +0000
@@ -103,7 +103,7 @@
 #define MS_CMDS (MS_MOVE | MS_REMOUNT | MS_BIND | MS_RBIND | \
 		 MS_UNBINDABLE | MS_RUNBINDABLE | MS_PRIVATE | MS_RPRIVATE | \
 		 MS_SLAVE | MS_RSLAVE | MS_SHARED | MS_RSHARED)
-#define MS_REMOUNT_FLAGS (MS_ALL_FLAGS & ~(MS_CMDS & ~MS_REMOUNT))
+#define MS_REMOUNT_FLAGS (MS_ALL_FLAGS & ~(MS_CMDS & ~MS_REMOUNT & ~MS_BIND & ~MS_RBIND))
 
 #define MNT_SRC_OPT 1
 #define MNT_DST_OPT 2



More information about the AppArmor mailing list