From owner-p4-projects@FreeBSD.ORG Fri Aug 22 09:33:23 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F0263106566C; Fri, 22 Aug 2008 09:33:22 +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 B4465106564A for ; Fri, 22 Aug 2008 09:33:22 +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 A21A68FC08 for ; Fri, 22 Aug 2008 09:33:22 +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.2/8.14.2) with ESMTP id m7M9XMLr025302 for ; Fri, 22 Aug 2008 09:33:22 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7M9XMFB025300 for perforce@freebsd.org; Fri, 22 Aug 2008 09:33:22 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Fri, 22 Aug 2008 09:33:22 GMT Message-Id: <200808220933.m7M9XMFB025300@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 148091 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: Fri, 22 Aug 2008 09:33:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=148091 Change 148091 by rwatson@rwatson_freebsd_capabilities on 2008/08/22 09:33:21 Update and refresh cap_enter(2) documentation in various ways. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/lib/libc/sys/cap_enter.2#2 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/lib/libc/sys/cap_enter.2#2 (text+ko) ==== @@ -41,21 +41,23 @@ .Ft int .Fn cap_getmode "u_int *modep" .Sh DESCRIPTION -Capability mode is a mode of execution in which processes may issue only -selected system calls consisting of file descriptor-based operations and -selected system calls for inspecting (but not generally modifying) global -system state. -Combined with capabilities created with -.Xr cap_new 2 , .Fn cap_enter -may be used to create kernel-enforced sandboxes in which to run -appropriately-crafted applications or application components. +places the current process into capability mode, a mode of execution in which +processes may only issue system calls operating on file descriptors or +reading limited global system state. +Access to global name spaces, such as file system or IPC name spaces, is +prevented. +If the process is already in a capability mode sandbox, the system call is a +no-op. +Future process descendents create with +.Xr fork 2 +will be placed in capability mode from inception. .Pp +When combined with capabilities created with +.Xr cap_new 2 , .Fn cap_enter -places the current process into a capability mode sandbox, restricting -further system calls that may be made by the process. -If the process is already in a capability mode sandbox, this sytem call is -a no-op. +may be used to create kernel-enforced sandboxes in which +appropriately-crafted applications or application components may be run. .Pp .Fn cap_getmode returns a flag indicating whether or not the process is in a capability mode