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/su.c | |
parent | 19310ee240abe31f1b5b3e8a14adb88286d62698 (diff) | |
download | hurd-d75bf60537850ac9edd04170d001ded4b41ac8bd.tar.gz hurd-d75bf60537850ac9edd04170d001ded4b41ac8bd.tar.bz2 hurd-d75bf60537850ac9edd04170d001ded4b41ac8bd.zip |
*** empty log message ***
Diffstat (limited to 'utils/su.c')
-rw-r--r-- | utils/su.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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; |