From: Todd C. Miller Date: Sun, 25 Oct 1998 20:21:19 +0000 (+0000) Subject: add back support for non-dispcrypt based checking for older DUNIX X-Git-Tag: SUDO_1_5_7~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e41aef0f357580cd6175d63a425a916ffb0bea5;p=sudo add back support for non-dispcrypt based checking for older DUNIX --- diff --git a/secureware.c b/secureware.c index e8406f6b5..52f76ec90 100644 --- a/secureware.c +++ b/secureware.c @@ -73,9 +73,21 @@ int check_secureware(pass) #ifdef __alpha extern int crypt_type; - if (crypt_type != INT_MAX && - strcmp(user_passwd, dispcrypt(pass, user_passwd, crypt_type)) == 0) + if (crypt_type == INT_MAX) + return(0); /* no shadow */ + +# ifdef HAVE_DISPCRYPT + if (strcmp(user_passwd, dispcrypt(pass, user_passwd, crypt_type)) == 0) return(1); +# else + if (crypt_type == AUTH_CRYPT_BIGCRYPT) { + if (strcmp(user_passwd, bigcrypt(pass, user_passwd)) == 0) + return(1); + } else if (crypt_type == AUTH_CRYPT_CRYPT16) { + if (strcmp(user_passwd, crypt(pass, user_passwd)) == 0) + return(1); + } +# endif /* HAVE_DISPCRYPT */ #elif defined(HAVE_BIGCRYPT) if (strcmp(user_passwd, bigcrypt(pass, user_passwd)) == 0) return(1);