mirror of
https://git.savannah.gnu.org/git/inetutils.git
synced 2026-01-19 00:08:17 +08:00
(rsaencpwd_passwdok): Use CRYPT instead of crypt.
<crypt.h>: New include.
This commit is contained in:
@@ -86,6 +86,7 @@ static char sccsid[] = "@(#)rsaencpwd.c 8.3 (Berkeley) 5/30/95";
|
||||
#else
|
||||
#include <string.h>
|
||||
#endif
|
||||
#include <crypt.h>
|
||||
|
||||
#include "encrypt.h"
|
||||
#include "auth.h"
|
||||
@@ -459,11 +460,8 @@ rsaencpwd_printsub(data, cnt, buf, buflen)
|
||||
}
|
||||
|
||||
int rsaencpwd_passwdok(name, passwd)
|
||||
char *name, *passwd;
|
||||
char *name, *passwd;
|
||||
{
|
||||
#ifdef HAVE_CRYPT
|
||||
char *crypt();
|
||||
#endif
|
||||
char *salt, *p;
|
||||
struct passwd *pwd;
|
||||
int passwdok_status = 0;
|
||||
@@ -472,11 +470,7 @@ char *name, *passwd;
|
||||
salt = pwd->pw_passwd;
|
||||
else salt = "xx";
|
||||
|
||||
#ifdef HAVE_CRYPT
|
||||
p = crypt(passwd, salt);
|
||||
#else
|
||||
p = passwd;
|
||||
#endif
|
||||
p = CRYPT (passwd, salt);
|
||||
|
||||
if (pwd && !strcmp(p, pwd->pw_passwd)) {
|
||||
passwdok_status = 1;
|
||||
|
||||
Reference in New Issue
Block a user