Messages in this thread Patch in this message | | | Subject | [PATCH] fs: make sure do_change_type() gets a valid type. | From | Maxime Bizon <> | Date | Mon, 28 Jun 2010 18:41:22 +0200 |
| |
Hi,
Busybox mount does not support --make-shared, and -o shared is used instead. This has the side effect that MS_SILENT can be passed too, and that prevents do_change_type() from working.
This patch fixes this by computing type using only relevant bits.
Signed-off-by: Maxime Bizon <mbizon@freebox.fr> --- fs/namespace.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/namespace.c b/fs/namespace.c index f20cb57..5360463 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1456,7 +1456,7 @@ static int do_change_type(struct path *path, int flag) { struct vfsmount *m, *mnt = path->mnt; int recurse = flag & MS_REC; - int type = flag & ~MS_REC; + int type = flag & (MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE); int err = 0; if (!capable(CAP_SYS_ADMIN)) -- 1.7.1
-- Maxime
| |