From owner-p4-projects@FreeBSD.ORG Thu Feb 7 14:37:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 099D416A419; Thu, 7 Feb 2008 14:37:31 +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 C324516A417 for ; Thu, 7 Feb 2008 14:37:30 +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 A792B13C447 for ; Thu, 7 Feb 2008 14:37:30 +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.1/8.14.1) with ESMTP id m17EbUhc076821 for ; Thu, 7 Feb 2008 14:37:30 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m17EbUhs076818 for perforce@freebsd.org; Thu, 7 Feb 2008 14:37:30 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Thu, 7 Feb 2008 14:37:30 GMT Message-Id: <200802071437.m17EbUhs076818@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 134988 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: Thu, 07 Feb 2008 14:37:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=134988 Change 134988 by rwatson@rwatson_freebsd_capabilities on 2008/02/07 14:36:44 Comment on .fo_flags, and why it's OK to hard-code DFLAG_PASSABLE, and not to specific DFLAG_SEEKABLE. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#16 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#16 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#15 $"); +__FBSDID("$P4: //depot/projects/trustedbsd/capabilities/src/sys/kern/sys_capability.c#16 $"); #include #include @@ -95,7 +95,18 @@ .fo_kqfilter = capability_kqfilter, .fo_stat = capability_stat, .fo_close = capability_close, - .fo_flags = DFLAG_PASSABLE, /* XXXRW: DFLAG_SEEKABLE? */ + + /* + * Possibly we should have two fileops vectors, one with and one + * without DFLAG_PASSABLE, in order to support wrapping objects who + * don't have DFLAG_PASSABLE. On the other hand, there are no such + * objects, which raises the question as to why the flag exists at + * all. + * + * No need to set DFLAG_SEEKABLE as any seek operations will fall + * through to the underlying object once the capability is verified. + */ + .fo_flags = DFLAG_PASSABLE, }; static uma_zone_t capability_zone;