Date: Tue, 5 Nov 2002 08:30:20 -0800 (PST) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 20692 for review Message-ID: <200211051630.gA5GUJaF035102@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211051630.gA5GUJaF035102>