From owner-cvs-src-old@FreeBSD.ORG Wed Jul 1 15:52:36 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EFDC106567D for ; Wed, 1 Jul 2009 15:52:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6FFD78FC20 for ; Wed, 1 Jul 2009 15:52:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n61FqZXi021690 for ; Wed, 1 Jul 2009 15:52:35 GMT (envelope-from trasz@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n61FqZVI021689 for cvs-src-old@freebsd.org; Wed, 1 Jul 2009 15:52:35 GMT (envelope-from trasz@repoman.freebsd.org) Message-Id: <200907011552.n61FqZVI021689@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to trasz@repoman.freebsd.org using -f From: Edward Tomasz Napierala Date: Wed, 1 Jul 2009 15:52:19 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/bin/chmod chmod.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2009 15:52:37 -0000 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