From 4228e9dd6c648c6643e90e4ca7cf3a90abccf3d3 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Fri, 19 Feb 1999 09:09:37 +0000 Subject: Fri Feb 19 02:43:11 1999 Thomas Bushnell, BSG * login.c (main): Correctly implement -f instead of always acting as if it were set. --- utils/ChangeLog | 3 +++ utils/login.c | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/ChangeLog b/utils/ChangeLog index a4d4e60c..3557112d 100644 --- a/utils/ChangeLog +++ b/utils/ChangeLog @@ -1,5 +1,8 @@ Fri Feb 19 02:43:11 1999 Thomas Bushnell, BSG + * login.c (main): Correctly implement -f instead of always + acting as if it were set. + * login.c (main): When transitioning from no UID's to having UID's create a new session like normal. Reported by Mark M. Kettenis . diff --git a/utils/login.c b/utils/login.c index f5d7da4e..cc368e5b 100644 --- a/utils/login.c +++ b/utils/login.c @@ -580,9 +580,13 @@ main(int argc, char *argv[]) /* Parse our options. */ argp_parse (&argp, argc, argv, ARGP_IN_ORDER, 0, 0); - /* Check passwords where necessary. */ - err = ugids_verify_make_auth (&ugids, &parent_uids, &parent_gids, 0, 0, - 0, 0, &auth); + /* Check passwords where necessary. If no_passwd is set, then our parent + guarantees identity itself (where it is allowed), but otherwise + we want every UID fully checked. */ + err = ugids_verify_make_auth (&ugids, + no_passwd ? &parent_uids : 0, + no_passwd ? &parent_gids : 0, + 0, 0, 0, 0, &auth); if (err == EACCES) fail (5, 0, "Invalid password", 0); else if (err) -- cgit v1.2.3