Author: kib
Date: Sat Oct  4 18:51:55 2014
New Revision: 272538
URL: https://svnweb.freebsd.org/changeset/base/272538

Log:
  Slightly reword comment.  Move code, which is described by the
  comment, after it.
  
  Discussed with:       bde
  Sponsored by: The FreeBSD Foundation
  MFC after:    1 week

Modified:
  head/sys/kern/vfs_vnops.c

Modified: head/sys/kern/vfs_vnops.c
==============================================================================
--- head/sys/kern/vfs_vnops.c   Sat Oct  4 18:40:40 2014        (r272537)
+++ head/sys/kern/vfs_vnops.c   Sat Oct  4 18:51:55 2014        (r272538)
@@ -2237,12 +2237,10 @@ vn_utimes_perm(struct vnode *vp, struct 
 {
        int error;
 
-       error = VOP_ACCESSX(vp, VWRITE_ATTRIBUTES, cred, td);
-
        /*
-        * From utimes(2):
-        * Grant permission if the caller is the owner of the file or
-        * the super-user.  If the time pointer is null, then write
+        * Grant permission if the caller is the owner of the file, or
+        * the super-user, or has ACL_WRITE_ATTRIBUTES permission on
+        * on the file.  If the time pointer is null, then write
         * permission on the file is also sufficient.
         *
         * From NFSv4.1, draft 21, 6.2.1.3.1, Discussion of Mask Attributes:
@@ -2250,6 +2248,7 @@ vn_utimes_perm(struct vnode *vp, struct 
         * will be allowed to set the times [..] to the current
         * server time.
         */
+       error = VOP_ACCESSX(vp, VWRITE_ATTRIBUTES, cred, td);
        if (error != 0 && (vap->va_vaflags & VA_UTIMES_NULL) != 0)
                error = VOP_ACCESS(vp, VWRITE, cred, td);
        return (error);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to