Skip to content

Commit

Permalink
powernv: Fix permissions on sysparam sysfs entries
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Jun 11, 2014
1 parent ad41733 commit 1bd0989
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/platforms/powernv/opal-sysparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1bd0989

Please sign in to comment.