summaryrefslogtreecommitdiff
path: root/auth2-pubkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth2-pubkey.c')
-rw-r--r--auth2-pubkey.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/auth2-pubkey.c b/auth2-pubkey.c
index a97509c28..137887ecd 100644
--- a/auth2-pubkey.c
+++ b/auth2-pubkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-pubkey.c,v 1.28 2011/05/11 04:47:06 djm Exp $ */ 1/* $OpenBSD: auth2-pubkey.c,v 1.29 2011/05/23 03:30:07 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -436,7 +436,7 @@ user_cert_trusted_ca(struct passwd *pw, Key *key)
436int 436int
437user_key_allowed(struct passwd *pw, Key *key) 437user_key_allowed(struct passwd *pw, Key *key)
438{ 438{
439 int success; 439 u_int success, i;
440 char *file; 440 char *file;
441 441
442 if (auth_key_is_revoked(key)) 442 if (auth_key_is_revoked(key))
@@ -448,9 +448,12 @@ user_key_allowed(struct passwd *pw, Key *key)
448 if (success) 448 if (success)
449 return success; 449 return success;
450 450
451 file = authorized_keys_file(pw); 451 for (i = 0; !success && i < options.num_authkeys_files; i++) {
452 success = user_key_allowed2(pw, key, file); 452 file = expand_authorized_keys(
453 xfree(file); 453 options.authorized_keys_files[i], pw);
454 success = user_key_allowed2(pw, key, file);
455 xfree(file);
456 }
454 457
455 return success; 458 return success;
456} 459}