From: Maxime Bizon on

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(a)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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/