version 1.33, 2014/11/20 14:53:15 |
version 1.34, 2014/11/21 05:13:44 |
|
|
char buf[1024], hash[_PASSWORD_LEN]; |
char buf[1024], hash[_PASSWORD_LEN]; |
sig_t saveint, savequit; |
sig_t saveint, savequit; |
int tries, pwd_tries; |
int tries, pwd_tries; |
char *p; |
char *p, *pref; |
|
|
saveint = signal(SIGINT, kbintr); |
saveint = signal(SIGINT, kbintr); |
savequit = signal(SIGQUIT, kbintr); |
savequit = signal(SIGQUIT, kbintr); |
|
|
(void)signal(SIGINT, saveint); |
(void)signal(SIGINT, saveint); |
(void)signal(SIGQUIT, savequit); |
(void)signal(SIGQUIT, savequit); |
|
|
if (crypt_newhash(buf, lc, hash, sizeof(hash)) == -1) { |
pref = login_getcapstr(lc, "localcipher", NULL, NULL); |
|
if (crypt_newhash(buf, pref, hash, sizeof(hash)) == -1) { |
(void)printf("Couldn't generate hash.\n"); |
(void)printf("Couldn't generate hash.\n"); |
pw_error(NULL, 0, 0); |
pw_error(NULL, 0, 0); |
} |
} |
|
free(pref); |
p = strdup(hash); |
p = strdup(hash); |
if (p == NULL) |
if (p == NULL) |
pw_error(NULL, 1, 1); |
pw_error(NULL, 1, 1); |