|
Lines 10-16
Link Here
|
| 10 |
#include <signal.h> |
10 |
#include <signal.h> |
| 11 |
#include <pwd.h> |
11 |
#include <pwd.h> |
| 12 |
#include <shadow.h> |
12 |
#include <shadow.h> |
| 13 |
#include <crypt.h> |
13 |
#include <xcrypt.h> |
| 14 |
#include <sys/types.h> |
14 |
#include <sys/types.h> |
| 15 |
#include <sys/wait.h> |
15 |
#include <sys/wait.h> |
| 16 |
#include <rpcsvc/ypclnt.h> |
16 |
#include <rpcsvc/ypclnt.h> |
|
Lines 481-491
Link Here
|
| 481 |
|
481 |
|
| 482 |
/* This exists because of timing attacks. */ |
482 |
/* This exists because of timing attacks. */ |
| 483 |
memset(input, 0x55, sizeof(input)); |
483 |
memset(input, 0x55, sizeof(input)); |
| 484 |
fake_salt = crypt_gensalt_ra(pam_unix_param.crypt_prefix, |
484 |
fake_salt = xcrypt_gensalt_ra(pam_unix_param.crypt_prefix, |
| 485 |
pam_unix_param.count, input, sizeof(input)); |
485 |
pam_unix_param.count, input, sizeof(input)); |
| 486 |
|
486 |
|
| 487 |
if (!fake_salt) { |
487 |
if (!fake_salt) { |
| 488 |
pam_syslog(pamh, LOG_CRIT, "crypt_gensalt_ra: %m"); |
488 |
pam_syslog(pamh, LOG_CRIT, "xcrypt_gensalt_ra: %m"); |
| 489 |
return PAM_BUF_ERR; |
489 |
return PAM_BUF_ERR; |
| 490 |
} |
490 |
} |
| 491 |
|
491 |
|
|
Lines 823-833
Link Here
|
| 823 |
void *data = NULL; |
823 |
void *data = NULL; |
| 824 |
int size = 0; |
824 |
int size = 0; |
| 825 |
|
825 |
|
| 826 |
retval = crypt_ra(key, salt, &data, &size); |
826 |
retval = xcrypt_ra(key, salt, &data, &size); |
| 827 |
if (retval) |
827 |
if (retval) |
| 828 |
retval = strdup(retval); /* we return NULL if strdup fails */ |
828 |
retval = strdup(retval); /* we return NULL if strdup fails */ |
| 829 |
else |
829 |
else |
| 830 |
pam_syslog(pamh, LOG_CRIT, "crypt_ra: %m"); |
830 |
pam_syslog(pamh, LOG_CRIT, "xcrypt_ra: %m"); |
| 831 |
if (data) { |
831 |
if (data) { |
| 832 |
memset(data, 0, size); |
832 |
memset(data, 0, size); |
| 833 |
free(data); |
833 |
free(data); |