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 /utils/login.c | |
parent | ad4469a8571ced533e358bc0832135a367a3442f (diff) | |
download | hurd-4228e9dd6c648c6643e90e4ca7cf3a90abccf3d3.tar.gz hurd-4228e9dd6c648c6643e90e4ca7cf3a90abccf3d3.tar.bz2 hurd-4228e9dd6c648c6643e90e4ca7cf3a90abccf3d3.zip |
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.
Diffstat (limited to 'utils/login.c')
-rw-r--r-- | utils/login.c | 10 |
1 files changed, 7 insertions, 3 deletions
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) |