From b942ef4ae606e9dc0541553d6b0b0a3a8033d7e5 Mon Sep 17 00:00:00 2001 From: rwatson Date: Tue, 12 Nov 2002 22:30:01 +0000 Subject: Add LOGIN_SETMAC to the list of flags that can't be set without class information, since we rely on the pwd entry to know what MAC labels to set as part of the login process. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories --- lib/libutil/login_class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libutil') diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index 219db58..d05b2e5 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -330,7 +330,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in /* we need a passwd entry to set these */ if (pwd == NULL) - flags &= ~(LOGIN_SETGROUP | LOGIN_SETLOGIN); + flags &= ~(LOGIN_SETGROUP | LOGIN_SETLOGIN | LOGIN_SETMAC); /* Set the process priority */ if (flags & LOGIN_SETPRIORITY) { -- cgit v1.1