Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Apr 2015 21:47:55 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r281086 - head/sys/kern
Message-ID:  <201504042147.t34LltiZ084425@svn.freebsd.org>

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



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