]> git.karo-electronics.de Git - linux-beck.git/commitdiff
userns: Allow the unprivileged users to mount mqueue fs
authorGao feng <gaofeng@cn.fujitsu.com>
Mon, 28 Jan 2013 03:09:01 +0000 (11:09 +0800)
committerEric W. Biederman <ebiederm@xmission.com>
Mon, 28 Jan 2013 03:25:50 +0000 (19:25 -0800)
This patch allow the unprivileged user to mount mqueuefs in
user ns.

If two userns share the same ipcns,the files in mqueue fs
should be seen in both these two userns.

If the userns has its own ipcns,it has its own mqueue fs too.
ipcns has already done this job well.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
ipc/mqueue.c

index 71a3ca18c873938238d03abed6c2cf8bb577d130..023c9867ff435e2020249c61e084f51534c2aee5 100644 (file)
@@ -1383,6 +1383,7 @@ static struct file_system_type mqueue_fs_type = {
        .name = "mqueue",
        .mount = mqueue_mount,
        .kill_sb = kill_litter_super,
+       .fs_flags = FS_USERNS_MOUNT,
 };
 
 int mq_init_ns(struct ipc_namespace *ns)