From owner-p4-projects Tue Nov 5 8:32:10 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4E72137B401; Tue, 5 Nov 2002 08:32:07 -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 ED43D37B404 for ; Tue, 5 Nov 2002 08:32:06 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B90543E4A for ; Tue, 5 Nov 2002 08:32:06 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gA5GUKmV035105 for ; Tue, 5 Nov 2002 08:30:20 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gA5GUJaF035102 for perforce@freebsd.org; Tue, 5 Nov 2002 08:30:20 -0800 (PST) Date: Tue, 5 Nov 2002 08:30:20 -0800 (PST) Message-Id: <200211051630.gA5GUJaF035102@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 Subject: PERFORCE change 20692 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=20692 Change 20692 by rwatson@rwatson_tislabs on 2002/11/05 08:30:19 Cleanup comments, et al. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/kern_exec.c#45 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_exec.c#45 (text+ko) ==== @@ -139,8 +139,8 @@ static const struct execsw **execsw; /* - * In-kernel implementation of execve(). All arguments are assumed to - * be userspace pointers from the passed thread. + * In-kernel implementation of execve(). All arguments are assumed to be + * userspace pointers from the passed thread. * * MPSAFE */ @@ -170,8 +170,8 @@ int credential_changing; int textset; #ifdef MAC - struct label interplabel; /* label of the interpreted file */ - struct label execlabel; /* additional MAC label argument */ + struct label interplabel; /* label of the interpreted vnode */ + struct label execlabel; /* optional label argument */ int will_transition, interplabelvalid = 0; #endif @@ -516,11 +516,15 @@ #ifdef MAC if (will_transition) { mac_execve_transition(oldcred, newcred, imgp->vp, - interplabelvalid ? &interplabel : NULL, imgp); + interplabelvalid ? &interplabel : NULL, imgp); } #endif /* * Implement correct POSIX saved-id behavior. + * + * XXXMAC: Note that the current logic will save the + * uid and gid if a MAC domain transition occurs, even + * though maybe it shouldn't. */ change_svuid(newcred, newcred->cr_uid); change_svgid(newcred, newcred->cr_gid); @@ -541,10 +545,6 @@ * ruid. The FreeBSD code always updates the saved uid/gid. * Also, this code uses the new (replaced) euid and egid as * the source, which may or may not be the right ones to use. - * - * XXX: Note that current logic will save the uid and gid - * if a MAC domain transition occurs, even though maybe it - * shouldn't. */ if (oldcred->cr_svuid != oldcred->cr_uid || oldcred->cr_svgid != oldcred->cr_gid) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message