Date: Sun, 5 Apr 2015 02:23:05 +0300 From: Sergey Kandaurov <pluknet@freebsd.org> To: Jilles Tjoelker <jilles@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r281086 - head/sys/kern Message-ID: <CAE-mSOJEZkqf9z9rpGUzy07gBpuFuF4hDVbc%2BSxfukt%2BBs0PNQ@mail.gmail.com> In-Reply-To: <201504042147.t34LltiZ084425@svn.freebsd.org> References: <201504042147.t34LltiZ084425@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 5 April 2015 at 00:47, Jilles Tjoelker <jilles@freebsd.org> wrote: > Author: jilles > Date: Sat Apr 4 21:47:54 2015 > New Revision: 281086 > URL: https://svnweb.freebsd.org/changeset/base/281086 > > Log: > utimensat: Correct Capsicum required capability rights. > > Modified: > head/sys/kern/vfs_syscalls.c > > Modified: head/sys/kern/vfs_syscalls.c > ============================================================================== > --- head/sys/kern/vfs_syscalls.c Sat Apr 4 21:34:26 2015 (r281085) > +++ head/sys/kern/vfs_syscalls.c Sat Apr 4 21:47:54 2015 (r281086) > @@ -3294,6 +3294,7 @@ kern_utimensat(struct thread *td, int fd > { > struct nameidata nd; > struct timespec ts[2]; > + cap_rights_t rights; > int error, flags; > > if (flag & ~AT_SYMLINK_NOFOLLOW) > @@ -3301,8 +3302,9 @@ kern_utimensat(struct thread *td, int fd > > if ((error = getutimens(tptr, tptrseg, ts, &flags)) != 0) > return (error); > - NDINIT_AT(&nd, LOOKUP, ((flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : > - FOLLOW) | AUDITVNODE1, pathseg, path, fd, td); > + NDINIT_ATRIGHTS(&nd, LOOKUP, ((flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : > + FOLLOW) | AUDITVNODE1, pathseg, path, fd, > + cap_rights_init(&rights, CAP_FUTIMES), td); > if ((error = namei(&nd)) != 0) > return (error); > /* > What about kern_lutimes()? It seems it needs CAP_FUTIMES as well due its path argument. -- wbr, pluknets
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE-mSOJEZkqf9z9rpGUzy07gBpuFuF4hDVbc%2BSxfukt%2BBs0PNQ>