diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-02-19 09:09:37 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-02-19 09:09:37 +0000 |
commit | 4228e9dd6c648c6643e90e4ca7cf3a90abccf3d3 (patch) | |
tree | 19d7bb1ea7beb404994f10f2f7440f74b045d5e0 | |
parent | ad4469a8571ced533e358bc0832135a367a3442f (diff) |
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.
-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) |