summaryrefslogtreecommitdiff
path: root/auth2-pubkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth2-pubkey.c')
-rw-r--r--auth2-pubkey.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/auth2-pubkey.c b/auth2-pubkey.c
index 5bccb5d76..d42ba14b8 100644
--- a/auth2-pubkey.c
+++ b/auth2-pubkey.c
@@ -211,6 +211,7 @@ match_principals_file(char *file, struct passwd *pw, struct KeyCert *cert)
211 restore_uid(); 211 restore_uid();
212 return 0; 212 return 0;
213 } 213 }
214 auth_start_parse_options();
214 while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) { 215 while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) {
215 /* Skip leading whitespace. */ 216 /* Skip leading whitespace. */
216 for (cp = line; *cp == ' ' || *cp == '\t'; cp++) 217 for (cp = line; *cp == ' ' || *cp == '\t'; cp++)
@@ -281,6 +282,8 @@ user_key_allowed2(struct passwd *pw, Key *key, char *file)
281 found_key = 0; 282 found_key = 0;
282 found = key_new(key_is_cert(key) ? KEY_UNSPEC : key->type); 283 found = key_new(key_is_cert(key) ? KEY_UNSPEC : key->type);
283 284
285 auth_start_parse_options();
286
284 while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) { 287 while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) {
285 char *cp, *key_options = NULL; 288 char *cp, *key_options = NULL;
286 289
@@ -417,6 +420,7 @@ user_cert_trusted_ca(struct passwd *pw, Key *key)
417 if (key_cert_check_authority(key, 0, 1, 420 if (key_cert_check_authority(key, 0, 1,
418 principals_file == NULL ? pw->pw_name : NULL, &reason) != 0) 421 principals_file == NULL ? pw->pw_name : NULL, &reason) != 0)
419 goto fail_reason; 422 goto fail_reason;
423 auth_start_parse_options();
420 if (auth_cert_options(key, pw) != 0) 424 if (auth_cert_options(key, pw) != 0)
421 goto out; 425 goto out;
422 426
@@ -440,9 +444,10 @@ user_key_allowed(struct passwd *pw, Key *key)
440 u_int success, i; 444 u_int success, i;
441 char *file; 445 char *file;
442 446
443 if (auth_key_is_revoked(key)) 447 if (auth_key_is_revoked(key, 0))
444 return 0; 448 return 0;
445 if (key_is_cert(key) && auth_key_is_revoked(key->cert->signature_key)) 449 if (key_is_cert(key) &&
450 auth_key_is_revoked(key->cert->signature_key, 0))
446 return 0; 451 return 0;
447 452
448 success = user_cert_trusted_ca(pw, key); 453 success = user_cert_trusted_ca(pw, key);