PERFORCE change 20692 for review
Robert Watson
rwatson at freebsd.org
Tue Nov 5 16:30:20 GMT 2002
http://perforce.freebsd.org/chv.cgi?CH=20692
Change 20692 by rwatson at 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 at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list