PERFORCE change 21447 for review

Robert Watson rwatson at freebsd.org
Sun Nov 24 05:29:37 GMT 2002


http://perforce.freebsd.org/chv.cgi?CH=21447

Change 21447 by rwatson at rwatson_tislabs on 2002/11/23 21:29:08

	Move to gshapiro's variation on the MAC patch to match what
	will be in sendmail.

Affected files ...

.. //depot/projects/trustedbsd/mac/contrib/sendmail/src/deliver.c#11 edit

Differences ...

==== //depot/projects/trustedbsd/mac/contrib/sendmail/src/deliver.c#11 (text+ko) ====

@@ -2352,15 +2352,20 @@
 
 			if (contextaddr != NULL)
 			{
+				int sucflags;
 				struct passwd *pwd;
 
 				if (contextaddr->q_ruser != NULL)
 					pwd = sm_getpwnam(contextaddr->q_ruser);
 				else
 					pwd = sm_getpwnam(contextaddr->q_user);
+				sucflags = LOGIN_SETRESOURCES|LOGIN_SETPRIORITY;
+#ifdef LOGIN_SETMAC
+				sucflags |= LOGIN_SETMAC;
+#endif /* LOGIN_SETMAC */
 				if (pwd != NULL &&
 				    setusercontext(NULL, pwd, pwd->pw_uid,
-						   LOGIN_SETRESOURCES|LOGIN_SETPRIORITY|LOGIN_SETMAC) == -1 &&
+						   sucflags) == -1 &&
 				    suidwarn)
 				{
 					syserr("openmailer: setusercontext() failed");
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