]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/proc/root.c
Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck...
[karo-tx-linux.git] / fs / proc / root.c
index b7fa4bfe896a2c17f05dd97add756bed889fd2b6..68feb0f70e6358f83f5a5281bf3c64d16cad2015 100644 (file)
@@ -112,9 +112,6 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,
                ns = task_active_pid_ns(current);
                options = data;
 
-               if (!capable(CAP_SYS_ADMIN) && !fs_fully_visible(fs_type))
-                       return ERR_PTR(-EPERM);
-
                /* Does the mounter have privilege over the pid namespace? */
                if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN))
                        return ERR_PTR(-EPERM);
@@ -159,7 +156,7 @@ static struct file_system_type proc_fs_type = {
        .name           = "proc",
        .mount          = proc_mount,
        .kill_sb        = proc_kill_sb,
-       .fs_flags       = FS_USERNS_MOUNT,
+       .fs_flags       = FS_USERNS_VISIBLE | FS_USERNS_MOUNT,
 };
 
 void __init proc_root_init(void)
@@ -182,10 +179,10 @@ void __init proc_root_init(void)
 #endif
        proc_mkdir("fs", NULL);
        proc_mkdir("driver", NULL);
-       proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */
+       proc_create_mount_point("fs/nfsd"); /* somewhere for the nfsd filesystem to be mounted */
 #if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE)
        /* just give it a mountpoint */
-       proc_mkdir("openprom", NULL);
+       proc_create_mount_point("openprom");
 #endif
        proc_tty_init();
        proc_mkdir("bus", NULL);