summaryrefslogtreecommitdiff
path: root/utils/su.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1996-07-30 19:17:43 +0000
committerThomas Bushnell <thomas@gnu.org>1996-07-30 19:17:43 +0000
commitd75bf60537850ac9edd04170d001ded4b41ac8bd (patch)
treef22a6b2bbde38fcf2aa9a0314404c71b781ef136 /utils/su.c
parent19310ee240abe31f1b5b3e8a14adb88286d62698 (diff)
*** empty log message ***
Diffstat (limited to 'utils/su.c')
-rw-r--r--utils/su.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/su.c b/utils/su.c
index 374696b5..6dfe2f59 100644
--- a/utils/su.c
+++ b/utils/su.c
@@ -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;