Date: Sat, 11 Oct 2014 18:01:10 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272948 - stable/10/sys/kern Message-ID: <201410111801.s9BI1AXm098129@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Oct 11 18:01:09 2014 New Revision: 272948 URL: https://svnweb.freebsd.org/changeset/base/272948 Log: MFC r272538: Slightly reword comment. Move code, which is described by the comment, after it. Modified: stable/10/sys/kern/vfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_vnops.c ============================================================================== --- stable/10/sys/kern/vfs_vnops.c Sat Oct 11 17:52:54 2014 (r272947) +++ stable/10/sys/kern/vfs_vnops.c Sat Oct 11 18:01:09 2014 (r272948) @@ -2232,12 +2232,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: @@ -2245,6 +2243,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410111801.s9BI1AXm098129>