version 1.47, 2015/02/17 00:14:05 |
version 1.48, 2015/05/01 03:23:51 |
|
|
|
|
/* test for correct signature */ |
/* test for correct signature */ |
authenticated = 0; |
authenticated = 0; |
if (PRIVSEP(user_key_allowed(authctxt->pw, key)) && |
if (PRIVSEP(user_key_allowed(authctxt->pw, key, 1)) && |
PRIVSEP(key_verify(key, sig, slen, buffer_ptr(&b), |
PRIVSEP(key_verify(key, sig, slen, buffer_ptr(&b), |
buffer_len(&b))) == 1) { |
buffer_len(&b))) == 1) { |
authenticated = 1; |
authenticated = 1; |
|
|
* if a user is not allowed to login. is this an |
* if a user is not allowed to login. is this an |
* issue? -markus |
* issue? -markus |
*/ |
*/ |
if (PRIVSEP(user_key_allowed(authctxt->pw, key))) { |
if (PRIVSEP(user_key_allowed(authctxt->pw, key, 0))) { |
packet_start(SSH2_MSG_USERAUTH_PK_OK); |
packet_start(SSH2_MSG_USERAUTH_PK_OK); |
packet_put_string(pkalg, alen); |
packet_put_string(pkalg, alen); |
packet_put_string(pkblob, blen); |
packet_put_string(pkblob, blen); |
|
|
* Check whether key authenticates and authorises the user. |
* Check whether key authenticates and authorises the user. |
*/ |
*/ |
int |
int |
user_key_allowed(struct passwd *pw, Key *key) |
user_key_allowed(struct passwd *pw, Key *key, int auth_attempt) |
{ |
{ |
u_int success, i; |
u_int success, i; |
char *file; |
char *file; |