]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powernv: Fix permissions on sysparam sysfs entries
authorAnton Blanchard <anton@samba.org>
Sat, 7 Jun 2014 01:29:01 +0000 (11:29 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 11 Jun 2014 07:03:15 +0000 (17:03 +1000)
Everyone can write to these files, which is not what we want.

Cc: stable@vger.kernel.org # 3.15
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/powernv/opal-sysparam.c

index d202f9bc3683f5ad0072282173ddfb510b1aec9a..9d1acf22a099dfc1bf474f6244af11d1153742f6 100644 (file)
@@ -260,10 +260,10 @@ void __init opal_sys_param_init(void)
                        attr[i].kobj_attr.attr.mode = S_IRUGO;
                        break;
                case OPAL_SYSPARAM_WRITE:
-                       attr[i].kobj_attr.attr.mode = S_IWUGO;
+                       attr[i].kobj_attr.attr.mode = S_IWUSR;
                        break;
                case OPAL_SYSPARAM_RW:
-                       attr[i].kobj_attr.attr.mode = S_IRUGO | S_IWUGO;
+                       attr[i].kobj_attr.attr.mode = S_IRUGO | S_IWUSR;
                        break;
                default:
                        break;