Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Dec 2009 14:04:11 GMT
From:      Jonathan Anderson <jona@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 171327 for review
Message-ID:  <200912031404.nB3E4Bon038598@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=171327

Change 171327 by jona@jona-capsicum-kent64 on 2009/12/03 14:03:56

	We should, of course, be setting *base to 0, not the local variable base

Affected files ...

.. //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_syscalls.c#22 edit

Differences ...

==== //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_syscalls.c#22 (text+ko) ====

@@ -165,7 +165,7 @@
  * Several *at() system calls are now supported in capability mode. This function
  * finds out what their "*at base" vnode, which is needed by namei(), should be:
  *
- * 1. In non-capability (and thus unconstrained) mode, base = 0.
+ * 1. In non-capability (and thus unconstrained) mode, *base = 0.
  * 2. In capability mode, base is the vnode given by the fd parameter, subject to
  *    the condition that the supplied 'rights' parameter (OR'ed with CAP_LOOKUP
  *    and CAP_ATBASE) is satisfied. The vnode is returned with a shared lock.
@@ -174,7 +174,7 @@
 fgetbase(struct thread *td, int fd, cap_rights_t rights, struct vnode **base)
 {
 	if (!(td->td_ucred->cr_flags & CRED_FLAG_CAPMODE))
-		base = 0;
+		*base = 0;
 
 	else {
 		int error;



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