Re: [RFC] add mount options to sysfs
From: Greg KH
Date: Wed May 18 2011 - 12:40:01 EST
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,
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?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/