|
@@ -17,12 +17,10 @@
|
17
|
17
|
*/
|
18
|
18
|
|
19
|
19
|
#define _XOPEN_SOURCE 700 // Needed to pull crypt() from unistd.h
|
20
|
|
-#define _GNU_SOURCE 1 // Needed to pull crypt_r() from crypt.h
|
21
|
20
|
|
22
|
21
|
#include <stdlib.h>
|
23
|
22
|
#include <string.h>
|
24
|
23
|
#include <unistd.h>
|
25
|
|
-#include <crypt.h>
|
26
|
24
|
|
27
|
25
|
#include <openssl/des.h>
|
28
|
26
|
|
|
@@ -296,9 +294,7 @@ static int newcamd_login(struct camd *c) {
|
296
|
294
|
return 0;
|
297
|
295
|
}
|
298
|
296
|
|
299
|
|
- struct crypt_data crypt_data;
|
300
|
|
- crypt_data.initialized = 0;
|
301
|
|
- char *crPasswd = crypt_r(c->pass, "$1$abcdefgh$", &crypt_data);
|
|
297
|
+ char *crPasswd = crypt(c->pass, "$1$abcdefgh$");
|
302
|
298
|
|
303
|
299
|
const int userLen = strlen(c->user) + 1;
|
304
|
300
|
const int passLen = strlen(crPasswd) + 1;
|