From owner-p4-projects@FreeBSD.ORG Sat Jun 6 21:53:55 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 972FD1065675; Sat, 6 Jun 2009 21:53:54 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 574B81065673 for ; Sat, 6 Jun 2009 21:53:54 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 440B58FC15 for ; Sat, 6 Jun 2009 21:53:54 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n56Lrs5F077576 for ; Sat, 6 Jun 2009 21:53:54 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n56LrsaK077574 for perforce@freebsd.org; Sat, 6 Jun 2009 21:53:54 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 6 Jun 2009 21:53:54 GMT Message-Id: <200906062153.n56LrsaK077574@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 163672 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2009 21:53:55 -0000 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 __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;