lkml.org 
[lkml]   [2011]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] add mount options to sysfs
On Wed, May 18, 2011 at 08:31:44PM +0400, Vasiliy Kulikov wrote:
> Currently there is no good way to effectively globally restrict an
> access to sysfs files. It's possible only to chmod the sysfs'
> root/directories to fully deny access to sysfs (sub-)tree to some users
> or chmod files after they are created. The latter approach is racy,
> however.

Why do you want to do this? What is in sysfs files that is not
gloabally ok to access? That should be fixed first, if at all, instead
of wanting to modify the whole sysfs tree, right?

> The patch introduces sysfs mount options parsing and adds 4 new options:
> uid, gid, mode and umask. uid, gid, and umask are classical options,
> mode is a global restricting mode mask that defined the most relaxed
> possible file mode. E.g. if mode=0750 then "chmod 0664" changes file's
> permissions to 0640.

What is going to break if you do this? Have you tested it? I'd be very
worried about this.

Again, what's the root problem you are trying to solve here?

thanks,

greg k-h


\
 
 \ /
  Last update: 2011-05-18 18:43    [W:0.043 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site