sysfs: change permissions for /sys from 0755 to 0555
authorVitaly Kuznetsov <vitty@altlinux.ru>
Tue, 17 Jan 2012 12:17:22 +0000 (12:17 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 24 Jan 2012 23:57:53 +0000 (15:57 -0800)
There is a misleading difference between /proc and /sys permissions, /proc is 0555 and /sys is 0755. But
as it is impossible to create or unlink something in /sys it would be nice to have same permissions.

Signed-off-by: Vitaly Kuznetsov <vitty@altlinux.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/mount.c

index e34f0d99ea4ec5a7b3361b1fc0cd02fad2d23410..140f26a342885e37a35e2ad94d01c20d27aa75ea 100644 (file)
@@ -36,7 +36,7 @@ struct sysfs_dirent sysfs_root = {
        .s_name         = "",
        .s_count        = ATOMIC_INIT(1),
        .s_flags        = SYSFS_DIR | (KOBJ_NS_TYPE_NONE << SYSFS_NS_TYPE_SHIFT),
-       .s_mode         = S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO,
+       .s_mode         = S_IFDIR | S_IRUGO | S_IXUGO,
        .s_ino          = 1,
 };