switch from the ancient des_ API to DES_

This commit is contained in:
naddy 2014-04-15 16:56:42 +00:00
parent 006a4401ee
commit a24c38e54a

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-provider_plugins_ldappasswords_cpp,v 1.1 2014/04/15 16:56:42 naddy Exp $
--- provider/plugins/ldappasswords.cpp.orig Mon Mar 31 13:45:38 2014
+++ provider/plugins/ldappasswords.cpp Tue Apr 15 18:27:06 2014
@@ -119,7 +119,7 @@ static char *password_encrypt_crypt(const char *data,
salt[0] = saltchars[rand[0] & 63];
salt[1] = saltchars[rand[1] & 63];
- des_fcrypt(data, salt, cryptbuf);
+ DES_fcrypt(data, salt, cryptbuf);
res = new char[32];
snprintf(res, 31, "{CRYPT}%s", cryptbuf);
@@ -135,7 +135,7 @@ static int password_check_crypt(const char *data, unsi
salt[1] = crypted[1];
salt[2] = 0;
- des_fcrypt(data, salt, cryptbuf);
+ DES_fcrypt(data, salt, cryptbuf);
if (!strcmp(cryptbuf, crypted))
return 0;