Date: Sat, 6 Jun 2009 21:53:54 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 163672 for review Message-ID: <200906062153.n56LrsaK077574@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=163672 Change 163672 by rwatson@rwatson_freebsd_capabilities on 2009/06/06 21:53:02 Properly #ifdef CAPABILITIES various capability-related monitoring parts in kern_descript.c. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/kern/kern_descrip.c#22 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/kern_descrip.c#22 (text+ko) ==== @@ -37,6 +37,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD: src/sys/kern/kern_descrip.c,v 1.353 2009/06/02 06:55:32 jeff Exp $"); +#include "opt_capabilities.h" #include "opt_compat.h" #include "opt_ddb.h" #include "opt_ktrace.h" @@ -2794,6 +2795,7 @@ tp = NULL; kif->kf_fd = i; +#ifdef CAPABILITIES /* * When reporting a capability, most fields will be from the * underlying object, but do mark as a capability. With @@ -2804,6 +2806,10 @@ kif->kf_flags |= KF_FLAG_CAPABILITY; (void)cap_fextract(fp, 0, &fp); } +#else + KASSERT(fp->f_type != DTYPE_CAPABILITY, + ("sysctl_kern_proc_filedesc: saw capability")); +#endif switch (fp->f_type) { case DTYPE_VNODE: kif->kf_type = KF_TYPE_VNODE; @@ -3063,6 +3069,7 @@ tp = NULL; kif->kf_fd = i; +#ifdef CAPABILITIES /* * When reporting a capability, most fields will be from the * underlying object, but do mark as a capability and export @@ -3073,6 +3080,10 @@ kif->kf_cap_rights = cap_rights(fp); (void)cap_fextract(fp, 0, &fp); } +#else + KASSERT(fp->f_type != DTYPE_CAPABILITY, + ("sysctl_kern_proc_filedesc: saw capability")); +#endif switch (fp->f_type) { case DTYPE_VNODE: kif->kf_type = KF_TYPE_VNODE;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906062153.n56LrsaK077574>