Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 3 Jun 2011 23:16:32 +0400
From: Vasiliy Kulikov <segoon@...nwall.com>
To: owl-dev@...ts.openwall.com
Cc: Eugene Teo <eugeneteo@...il.com>
Subject: Re: add mount options to sysfs (was: segoon's status
 report - #1 of 15)

On Fri, Jun 03, 2011 at 23:03 +0400, Solar Designer wrote:
> I think that having both umask= and mode= is not needed for sysfs and
> debugfs.  I think umask= should be left, mode= removed.

OK.

> If I understood correctly, with your implementation (current patch),
> umask applies when entries are created initially,

Correct.

> and mode on chmod().

No, "mode" is used in all situations when inode's mode is needed.
Technically, when inode is created or its mode is changed, the formula
for inode's mode calculation is as follows:

    inode->mode &= sysfs_info->mode | ~0777;

So, all chmod()s would proceed, but don't relax permissions more than
"mode".

Thanks,

-- 
Vasiliy

[ CONTENT OF TYPE application/pgp-signature SKIPPED ]

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ