lkml.org 
[lkml]   [2008]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] clocksource: Fix permissions for available_clocksource
On Fri, May 02, 2008 at 05:34:06PM +0200, Thomas Gleixner wrote:
> On Fri, 2 May 2008, Heiko Carstens wrote:
> > On Fri, May 02, 2008 at 04:36:37PM +0200, Thomas Gleixner wrote:
> > > On Fri, 2 May 2008, Heiko Carstens wrote:
> > > > From: Heiko Carstens <heiko.carstens@de.ibm.com>
> > > >
> > > > File permissions for
> > > > /sys/devices/system/clocksource/clocksource0/available_clocksource
> > > > are 600 which allows write access. But this is in fact a read only
> > > > file. So change permissions to 400.
> > >
> > > Indeed. The question is whether we should make this 444. There is no
> > > harm, when users can read the info. Same applies for the
> > > current_clocksource entry, making it 644 should be fine.
> >
> > Sure, I can send an on-top patch for this.
>
> Yes, please.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
kernel/time/clocksource.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/kernel/time/clocksource.c
===================================================================
--- linux-2.6.orig/kernel/time/clocksource.c
+++ linux-2.6/kernel/time/clocksource.c
@@ -471,10 +471,10 @@ sysfs_show_available_clocksources(struct
/*
* Sysfs setup bits:
*/
-static SYSDEV_ATTR(current_clocksource, 0600, sysfs_show_current_clocksources,
+static SYSDEV_ATTR(current_clocksource, 0644, sysfs_show_current_clocksources,
sysfs_override_clocksource);

-static SYSDEV_ATTR(available_clocksource, 0400,
+static SYSDEV_ATTR(available_clocksource, 0444,
sysfs_show_available_clocksources, NULL);

static struct sysdev_class clocksource_sysclass = {

\
 
 \ /
  Last update: 2008-05-03 14:25    [W:0.062 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site