PERFORCE change 171327 for review
Jonathan Anderson
jona at FreeBSD.org
Thu Dec 3 14:04:11 UTC 2009
http://p4web.freebsd.org/chv.cgi?CH=171327
Change 171327 by jona at 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;
More information about the p4-projects
mailing list