summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-10-11 18:01:09 +0000
committerkib <kib@FreeBSD.org>2014-10-11 18:01:09 +0000
commit82d8b580fd70eba445af242e1d0ebd3744930639 (patch)
treeaa9cb3f49d78d9096511ee32f68d22ad8ac12f31 /sys/kern
parent149982a012806bc520fa15bfff1a47aea2968623 (diff)
downloadFreeBSD-src-82d8b580fd70eba445af242e1d0ebd3744930639.zip
FreeBSD-src-82d8b580fd70eba445af242e1d0ebd3744930639.tar.gz
MFC r272538:
Slightly reword comment. Move code, which is described by the comment, after it.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_vnops.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index de0c23b..776954d 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -2232,12 +2232,10 @@ vn_utimes_perm(struct vnode *vp, struct vattr *vap, struct ucred *cred,
{
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:
@@ -2245,6 +2243,7 @@ vn_utimes_perm(struct vnode *vp, struct vattr *vap, struct ucred *cred,
* 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);
OpenPOWER on IntegriCloud