From craig@backfire.ca  Sat Jan 29 16:12:56 2005
Return-Path: <craig@backfire.ca>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 13D3516A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 29 Jan 2005 16:12:56 +0000 (GMT)
Received: from backfire.ca (CPE0050bf78b8c6-CM023459906096.cpe.net.cable.rogers.com [24.157.84.118])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 876E043D1F
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 29 Jan 2005 16:12:55 +0000 (GMT)
	(envelope-from craig@backfire.ca)
Received: from craig by backfire.ca with local (Exim 4.43 (FreeBSD))
	id 1CuvDV-000DYm-Cp
	for FreeBSD-gnats-submit@freebsd.org; Sat, 29 Jan 2005 11:12:57 -0500
Message-Id: <E1CuvDV-000DYm-Cp@backfire.ca>
Date: Sat, 29 Jan 2005 11:12:57 -0500
From: Craig <craig@backfire.ca>
Reply-To: Craig <craig@backfire.ca>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ACL modifications touch file's mtime 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         76818
>Category:       kern
>Synopsis:       ACL modifications touch file's mtime
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    rwatson
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 29 16:20:14 GMT 2005
>Closed-Date:    Fri Feb 06 12:42:50 UTC 2009
>Last-Modified:  Fri Feb 06 12:42:50 UTC 2009
>Originator:     Craig
>Release:        FreeBSD 5.3-RELEASE-p2 i386
>Organization:
The SCO Group, INC 
>Environment:
System: FreeBSD burnout 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #1: Wed Jan 5 18:44:27 EST 2005 craig@burnout:/usr/obj/usr/src/sys/BURNOUT5 i386


	
>Description:
The creation/removal/modification of a file's ACL data changes the
file's mtime, which is somewhat undesired behaviour. Commands
such as chmod and chown do _not_ change the mtime.
	
>How-To-Repeat:
Enable ACL technology, as described in the docs.
Then, run the following command sequences:

# touch me && ls -l me && sleep 300 && setfacl -m u:root:rwx me && ls -l me
-rw-r--r--  1 craig  admins  0 May 19 03:09 me
-rw-rwxr--+ 1 craig  admins  0 May 19 03:14 me*
# rm me
# touch me && ls -l me && sleep 300 && chmod 777 me && ls -l me
-rw-r--r--  1 craig  admins  0 May 19 03:28 me
-rwxrwxrwx  1 craig  admins  0 May 19 03:28 me*
#
I have been aware of this problem since FreeBSD ~5.2-current.
	
>Fix:
Find erroneous code, patch, commit, MFC. Lather, rinse, repeat if desired.
	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->rwatson 
Responsible-Changed-By: pjd 
Responsible-Changed-When: Sat Feb 12 10:52:58 GMT 2005 
Responsible-Changed-Why:  
Robert, can you look into this? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76818 

Adding to audit trail from misfiled PR kern/91679:

Date: Wed, 11 Jan 2006 15:59:53 +0000 (GMT)
From: Robert Watson <rwatson@FreeBSD.org>

 On Thu, 5 Jan 2006, Ceri Davies wrote:
 
 > On 5 Jan 2006, at 18:43, Ahnjoan Amous wrote:
 >
 >> In 5.2.1-RELEASE, setfacl updates the modification time of the file
 >> when acls are changed.  I haven't been able to find any complaints
 >> about this behavior, is this something folks on the list would expect
 >> when using setfacl?  If so, does anyone know a work around?
 >
 > PR 76818 is open for this issue, but there is no progress logged at present.
 
 This likely occurs because EA writes modify the last modification timestamp. 
 I can imagine a couple of possible avenues to explore in fixing it, including:
 
 (1) Make system name space EA writes not update the modification time.
 
 (2) Add a flag to allow EA writes to be marked as not updating the
      modification time.
 
 It could be POSIX.1e has something to say about time stamp modifications for 
 setfacl; personally I'd expect it to match the behavior of chmod.  And I 
 believe chmod doesn't update the time stamp.
 
 Robert N M Watson
State-Changed-From-To: open->patched 
State-Changed-By: rwatson 
State-Changed-When: Sun Feb 1 18:55:40 UTC 2009 
State-Changed-Why:  
This problem is now believed to be fixed in FreeBSD 8.x using the patch 
found in ports/125739.  I plan to MFC this in a few days, at which point 
I will update this PR as well.  The fix should ship in FreeBSD 7.2. 
Thanks for the report 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76818 
State-Changed-From-To: patched->closed 
State-Changed-By: rwatson 
State-Changed-When: Fri Feb 6 12:42:09 UTC 2009 
State-Changed-Why:  
The fix has now been MFC'd to 7.x, and will appear in FreeBSD 7.2 later 
this year.  Thanks for the report! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76818 
>Unformatted:
