Date: Wed, 1 Jul 2009 15:52:19 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/bin/chmod chmod.c Message-ID: <200907011552.n61FqZVI021689@repoman.freebsd.org>
index | next in thread | raw e-mail
trasz 2009-07-01 15:52:19 UTC
FreeBSD src repository
Modified files:
bin/chmod chmod.c
Log:
SVN rev 195243 on 2009-07-01 15:52:19Z by trasz
With NFSv4 ACLs, it is possible that applying a mode to an ACL which
is identical to the mode computed from that ACL will modify the ACL.
For example, mode computed from the following ACL is 0600:
user:kamila:rwx--------C--:------:allow
owner@:--x-----------:------:deny
owner@:rw-p---A-W-Co-:------:allow
group@:rwxp----------:------:deny
group@:--------------:------:allow
everyone@:rwxp---A-W-Co-:------:deny
everyone@:------a-R-c--s:------:allow
However, applying that mode (chmod 0600) changes the ACL into this:
user:kamila:rwx-----------:------:deny
user:kamila:rwx--------C--:------:allow
owner@:--x-----------:------:deny
owner@:rw-p---A-W-Co-:------:allow
group@:rwxp----------:------:deny
group@:--------------:------:allow
everyone@:rwxp---A-W-Co-:------:deny
everyone@:------a-R-c--s:------:allow
In chmod(1) utility, there is an optimisation, which makes it not
call chmod(2) if the mode of the file is the same as the new mode.
Disable that optimisation for files which may have NFSv4 ACLs.
Reviewed by: rwatson
Approved by: re (kib)
Revision Changes Path
1.35 +30 -2 src/bin/chmod/chmod.c
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907011552.n61FqZVI021689>
