diff options
author | Thomas Bushnell <thomas@gnu.org> | 1996-07-30 19:17:43 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1996-07-30 19:17:43 +0000 |
commit | d75bf60537850ac9edd04170d001ded4b41ac8bd (patch) | |
tree | f22a6b2bbde38fcf2aa9a0314404c71b781ef136 /utils | |
parent | 19310ee240abe31f1b5b3e8a14adb88286d62698 (diff) |
*** empty log message ***
Diffstat (limited to 'utils')
-rw-r--r-- | utils/ChangeLog | 10 | ||||
-rw-r--r-- | utils/login.c | 6 | ||||
-rw-r--r-- | utils/su.c | 8 |
3 files changed, 21 insertions, 3 deletions
diff --git a/utils/ChangeLog b/utils/ChangeLog index a20f8721..fe4436ff 100644 --- a/utils/ChangeLog +++ b/utils/ChangeLog @@ -1,3 +1,13 @@ +Tue Jul 30 14:49:48 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> + + * login.c (main/verify_passwd): If government is broken, don't use + crypt. + * su.c (check_password): Likewise. + + * login.c (main/verify_passwd): Provide correct prototype for + crypt. + * su.c (check_password): Likewise. + Mon Jul 29 03:22:07 1996 Miles Bader <miles@gnu.ai.mit.edu> * vmstat.c (val_t): Make `long long'. diff --git a/utils/login.c b/utils/login.c index b93cbc4e..10762bc8 100644 --- a/utils/login.c +++ b/utils/login.c @@ -513,7 +513,7 @@ main(int argc, char *argv[]) void verify_passwd (const char *name, const char *password, uid_t id, int is_group) { - extern char *crypt (const char salt[2], const char *string); + extern char *crypt (const char *string, const char salt[2]); char *prompt, *unencrypted, *encrypted; if (!password || !*password @@ -531,9 +531,13 @@ main(int argc, char *argv[]) prompt = "Password:"; unencrypted = getpass (prompt); +#ifdef government_not_broken encrypted = crypt (unencrypted, password); /* Paranoia may destroya. */ memset (unencrypted, 0, strlen (unencrypted)); +#else + encrypted = unencrypted; +#endif if (name) free (prompt); @@ -1,5 +1,5 @@ /* `su' for GNU Hurd. - Copyright (C) 1994, 1995 Free Software Foundation + Copyright (C) 1994, 1995, 1996 Free Software Foundation Written by Roland McGrath. This file is part of the GNU Hurd. @@ -455,7 +455,7 @@ apply_auth_to_pgrp (struct auth *auth, pid_t pgrp) int check_password (const char *name, const char *password) { - extern char *crypt (const char salt[2], const char *string); + extern char *crypt (const char *string, const char salt[2]); char *unencrypted, *encrypted; static char *prompt = NULL; @@ -464,8 +464,12 @@ check_password (const char *name, const char *password) asprintf (&prompt, "%s's Password:", name); unencrypted = getpass (prompt); +#ifdef government_not_broken encrypted = crypt (unencrypted, password); memset (unencrypted, 0, strlen (unencrypted)); /* Paranoia may destroya. */ +#else + encrypted = unencrypted; +#endif if (!strcmp (encrypted, password)) return 1; |