From owner-p4-projects Mon Jul 15 13:21:30 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F031137B401; Mon, 15 Jul 2002 13:21:16 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8696137B400 for ; Mon, 15 Jul 2002 13:21:16 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3050043E31 for ; Mon, 15 Jul 2002 13:21:16 -0700 (PDT) (envelope-from chris@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6FKLGJU009625 for ; Mon, 15 Jul 2002 13:21:16 -0700 (PDT) (envelope-from chris@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6FKLFYo009622 for perforce@freebsd.org; Mon, 15 Jul 2002 13:21:15 -0700 (PDT) Date: Mon, 15 Jul 2002 13:21:15 -0700 (PDT) Message-Id: <200207152021.g6FKLFYo009622@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to chris@freebsd.org using -f From: Chris Costello Subject: PERFORCE change 14298 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=14298 Change 14298 by chris@chris_holly on 2002/07/15 13:20:56 o Document mac_policy_cred_check_relabel_subject and mac_policy_cred_check_statfs. o Change in the paramter list to . o Slightly reword mac_policy_cred_check_debug_proc ("should be debugging" -> "should be allowed to debug"). Affected files ... .. //depot/projects/trustedbsd/doc/en_US.ISO8859-1/books/developers-handbook/mac/chapter.sgml#3 edit Differences ... ==== //depot/projects/trustedbsd/doc/en_US.ISO8859-1/books/developers-handbook/mac/chapter.sgml#3 (text+ko) ==== @@ -83,6 +83,111 @@ ... + + <function>mac_<replaceable>policy</replaceable>_cred_check_relabel_subject</function> + + + + static int + mac_policy_cred_check_relabel_subject + + + struct ucred + *cred + struct label + *newlabel + + + + + + + + Parameter + Description + + + + + + cred + Subject credential + + + + newlabel + New label to apply to subject + + + + + This policy operation is intended to determine whether a + subject should be allowed to change its label. Generally, + this is implemented by checking if the subject would be + upgrading its own privilege by making the requested change, + and denying (returning typically + EPERM) the request if so. + + + + <function>mac_<replaceable>policy</replaceable>_cred_check_statfs</function + + + + static int + mac_policy_cred_check_statfs + + + struct ucred + *cred + struct mount + *mp + struct label + *mntlabel + + + + + + + + Parameter + Description + + + + + cred + Subject credential + + + + mp + Object; file system mount point + + + + mntlabel + Object label + + + + + This policy operation is intended to determine whether a + specified subject should be allowed to retrieve file system + statistics information. Generally a policy module + implementing this operation would compare the subject label + (cred->cr_label) to the object label + (mntlabel) and return + 0 if the subject is to be granted the + information requested, and EACCES + otherwise. + + Figure out a scenario where using + mp is immenently practical, especially + for use in the sample module. + + <function>mac_<replaceable>policy</replaceable>_cred_check_debug_proc</function> @@ -99,9 +204,7 @@ - - Parameters - + @@ -112,7 +215,7 @@ - cred + cred Subject credential @@ -122,20 +225,17 @@ -
+ This policy operation is intended to determine whether a - specified subject process should be debugging a specified - object process. Generally a policy module implementing this - operation would compare the subject label + specified subject process should be allowed to debug a + specified object process. Generally a policy module + implementing this operation would compare the subject label (cred->cr_label) to the object label (proc->p_ucred->cr_label) and return 0 if the subject is allowed to debug the - object, or EACCES if it - cannot. - - Why does BIBA return 'No such process' if the - process is of lower integrity? + object, or an error (typically + EACCES) if it cannot.
To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message