Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Apr 2016 21:04:51 +0000 (UTC)
From:      Jilles Tjoelker <jilles@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: r297765 - stable/10/sys/kern
Message-ID:  <201604092104.u39L4p33011488@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604092104.u39L4p33011488>