From 42c0e331cd63aea8f310a2ad8e3e14094a307ee0 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Thu, 16 Jan 2003 03:41:57 +0000 Subject: [PATCH] Using LOGIN_SETALL &~LOGIN_SETMAC to avoid setting the MAC label improperly, rather than specifically setting the process priority and resource class; otherwise, we improperly set other aspects of the login class. We have a bit more to do here, but the proper fix will probably involve breaking out MAC labels from the login class at some point, as well as further clarifying the logic here. Pointed out by: kuriyama, max --- usr.sbin/inetd/inetd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index d47691ec0f00..8390c09e6fd1 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -812,7 +812,7 @@ main(int argc, char **argv) } #ifdef LOGIN_CAP if (setusercontext(lc, pwd, pwd->pw_uid, - LOGIN_SETRESOURCES | LOGIN_SETPRIORITY) + LOGIN_SETALL & ~LOGIN_SETMAC) != 0) { syslog(LOG_ERR, "%s: can't setusercontext(..%s..): %m",