From 02f22d5c684d29800ca6b69e3ebca094f3c17cb0 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Tue, 30 Jul 1996 19:23:31 +0000 Subject: *** empty log message *** --- utils/su.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'utils/su.c') diff --git a/utils/su.c b/utils/su.c index 6dfe2f59..32ae99a7 100644 --- a/utils/su.c +++ b/utils/su.c @@ -452,6 +452,8 @@ apply_auth_to_pgrp (struct auth *auth, pid_t pgrp) run by uid 0 or if PASSWORD is an empty password, and always under -r. Always prints a message before returning 0. */ +asm (".weak crypt"); + int check_password (const char *name, const char *password) { @@ -464,12 +466,13 @@ 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 (crypt) + { + encrypted = crypt (unencrypted, password); + memset (unencrypted, 0, strlen (unencrypted)); /* Paranoia may destroya. */ + } + else + encrypted = unencrypted; if (!strcmp (encrypted, password)) return 1; -- cgit v1.2.3