From owner-p4-projects Mon Jan 13 20:34: 6 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4D92E37B406; Mon, 13 Jan 2003 20:33:53 -0800 (PST) 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 D468637B407 for ; Mon, 13 Jan 2003 20:33:52 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31BE043F13 for ; Mon, 13 Jan 2003 20:33:52 -0800 (PST) (envelope-from chris@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h0E4Xqfh001112 for ; Mon, 13 Jan 2003 20:33:52 -0800 (PST) (envelope-from chris@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h0E4XpEU001109 for perforce@freebsd.org; Mon, 13 Jan 2003 20:33:51 -0800 (PST) Date: Mon, 13 Jan 2003 20:33:51 -0800 (PST) Message-Id: <200301140433.h0E4XpEU001109@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to chris@freebsd.org using -f From: Chris Costello Subject: PERFORCE change 23716 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://perforce.freebsd.org/chv.cgi?CH=23716 Change 23716 by chris@chris_holly on 2003/01/13 20:33:12 Document the remaining new vnode access checks. Affected files ... .. //depot/projects/trustedbsd/doc/en_US.ISO8859-1/books/developers-handbook/mac/chapter.sgml#23 edit Differences ... ==== //depot/projects/trustedbsd/doc/en_US.ISO8859-1/books/developers-handbook/mac/chapter.sgml#23 (text+ko) ==== @@ -595,7 +595,7 @@ Fill in the label (delabel) for - a newly created &man.devfs.9; symbolic link entry. + a newly created &man.devfs.5; symbolic link entry. @@ -3530,7 +3530,8 @@ Determine whether the subject credential can relabel itself to the passed label update. - + + <function>&mac.mpo;_check_vnode_relabel</function> @@ -3793,6 +3794,52 @@ or EPERM for lack of privilege. + + + <function>&mac.mpo;_check_vnode_chroot</function> + + + + int + &mac.mpo;_check_vnode_chroot + + struct ucred + *cred + struct vnode + *dvp + struct label + *dlabel + + + + + + &mac.thead; + + + + cred + Subject credential + + + + dvp + Directory vnode + + + + dlabel + Policy label associated with + dvp + + + + + + Determine whether the subject should be allowed to + &man.chroot.2; into the specified directory + (dvp). + <function>&mac.mpo;_check_vnode_create</function> @@ -4177,6 +4224,421 @@ or EPERM for lack of privilege. + + + <function>&mac.mpo;_check_vnode_link</function> + + + + int + &mac.mpo;_check_vnode_link + + struct ucred + *cred + struct vnode + *dvp + struct label + *dlabel + struct vnode + *vp + struct label + *label + struct componentname + *cnp + + + + + + &mac.thead; + + + + cred + Subject credential + + + + dvp + Directory vnode + + + + dlabel + Policy label associated with + dvp + + + + vp + Link destination vnode + + + + label + Policy label associated with + vp + + + + cnp + Component name for the link being created + + + + + + Determine whether the subject should be allowed to + create a link to the vnode vp with + the name specified by cnp. + + + + <function>&mac.mpo;_check_vnode_mmap</function> + + + + int + &mac.mpo;_check_vnode_mmap + + struct ucred + *cred + struct vnode + *vp + struct label + *label + int prot + + + + + + &mac.thead; + + + + cred + Subject credential + + + + vp + Vnode to map + + + + label + Policy label associated with + vp + + + + prot + Mmap protections (see &man.mmap.2;) + + + + + + Determine whether the subject should be allowed to map + the vnode vp with the protections + specified in prot. + + + + <function>&mac.mpo;_check_mmap_downgrade</function> + + + + void + &mac.mpo;_check_mmap_downgrade + + struct ucred + *cred + struct vnode + *vp + struct label + *label + int *prot + + + + + + &mac.thead; + + + + cred + See + . + + + + vp + + + + label + + + + prot + Mmap protections to be downgraded + + + + + + Downgrade the mmap protections based on the subject and + object labels. + + + + <function>&mac.mpo;_check_vnode_mprotect</function> + + + + int + &mac.mpo;_check_vnode_mprotect + + struct ucred + *cred + struct vnode + *vp + struct label + *label + int prot + + + + + + &mac.thead; + + + + cred + Subject credential + + + + vp + Mapped vnode + + + + prot + Memory protections + + + + + + Determine whether the subject should be allowed to + set the specified memory protections on memory mapped from + the vnode vp. + + + + <function>&mac.mpo;_check_vnode_poll</function> + + + + int + &mac.mpo;_check_vnode_poll + + struct ucred + *active_cred + struct ucred + *file_cred + struct vnode + *vp + struct label + *label + + + + + + &mac.thead; + + + + active_cred + Subject credential + + + + file_cred + Credential associated with the struct + file + + + + vp + Polled vnode + + + + label + Policy label associated with + vp + + + + + + Determine whether the subject should be allowed to poll + the vnode vp. + + + + <function>&mac.mpo;_check_vnode_rename_from</function> + + + + int + &mac.mpo;_vnode_rename_from + + struct ucred + *cred + struct vnode + *dvp + struct label + *dlabel + struct vnode + *vp + struct label + *label + struct componentname + *cnp + + + + + + &mac.thead; + + + + cred + Subject credential + + + + dvp + Directory vnode + + + + dlabel + Policy label associated with + dvp + + + + vp + Vnode to be renamed + + + + label + Policy label asociated with + vp + + + + cnp + Component name for + vp + + + + + + Determine whether the subject should be allowed to + rename the vnode vp to something + else. + + + + <function>&mac.mpo;_check_vnode_rename_to</function> + + + + int + &mac.mpo;_check_vnode_rename_to + + struct ucred + *cred + struct vnode + *dvp + struct label + *dlabel + struct vnode + *vp + struct label + *label + int samedir + struct componentname + *cnp + + + + + + &mac.thead; + + + + cred + Subject credential + + + + dvp + Directory vnode + + + + dlabel + Policy label associated with + dvp + + + + vp + Overwritten vnode + + + + label + Policy label associated with + vp + + + + samedir + Boolean; 1 if the source and + destination directories are the same + + + + cnp + Destination component name + + + + + + Determine whether the subject should be allowed to + rename to the vnode vp, into the + directory dvp, or to the name + represented by cnp. If there is no + existing file to overwrite, vp and + label will be NULL. + <function>&mac.mpo;_check_socket_listen</function> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message