Author: jilles Date: Sat Apr 9 21:04:51 2016 New Revision: 297765 URL: https://svnweb.freebsd.org/changeset/base/297765
Log: MFC r281086: utimensat: Correct Capsicum required capability rights. Modified: stable/10/sys/kern/vfs_syscalls.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_syscalls.c ============================================================================== --- stable/10/sys/kern/vfs_syscalls.c Sat Apr 9 20:36:07 2016 (r297764) +++ stable/10/sys/kern/vfs_syscalls.c Sat Apr 9 21:04:51 2016 (r297765) @@ -3405,6 +3405,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) @@ -3412,8 +3413,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); /* _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"