powernv: Fix permissions on sysparam sysfs entries

commit 1bd098903f upstream.

Everyone can write to these files, which is not what we want.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Anton Blanchard
2014-06-07 11:29:01 +10:00
committed by Greg Kroah-Hartman
parent b180a6567a
commit 948eccfe9a

View 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;