On 5 April 2015 at 00:47, Jilles Tjoelker <[email protected]> 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 _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
