summaryrefslogtreecommitdiff
path: root/utils/login.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-02-19 07:46:51 +0000
committerThomas Bushnell <thomas@gnu.org>1999-02-19 07:46:51 +0000
commit4770dce698e6c6526e6383e1b426c5f8bcaad869 (patch)
tree0023b5234558c502fd4c9bb2e454a40a6ea8f262 /utils/login.c
parentd822f1e0c93ee19dd34462ed3fab51b2b4f22bc4 (diff)
Fri Feb 19 02:43:11 1999 Thomas Bushnell, BSG <tb@mit.edu>
* login.c (main): When transitioning from no UID's to having UID's create a new session like normal. Reported by Mark M. Kettenis <kettenis@wins.uva.nl>.
Diffstat (limited to 'utils/login.c')
-rw-r--r--utils/login.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/login.c b/utils/login.c
index 26407e7d..f5d7da4e 100644
--- a/utils/login.c
+++ b/utils/login.c
@@ -646,7 +646,9 @@ main(int argc, char *argv[])
err = proc_getsid (proc_server, pid, &sid);
assert_perror (err); /* This should never fail. */
- if (!no_login && parent_uids.num != 0)
+ if (!no_login
+ && (parent_uids.num != 0
+ || ugids.eff_uids.num + ugids.avail_uids.num > 0))
/* Make a new login collection (but only for real users). */
{
char *user = envz_get (args, args_len, "USER");