diff options
-rw-r--r-- | utils/ChangeLog | 3 | ||||
-rw-r--r-- | utils/login.c | 10 |
2 files changed, 10 insertions, 3 deletions
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 <tb@mit.edu> + * 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 <kettenis@wins.uva.nl>. 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) |