summaryrefslogtreecommitdiffstats
path: root/auth2-pubkey.c
diff options
context:
space:
mode:
authorjsing@openbsd.org <jsing@openbsd.org>2015-06-15 18:42:19 +0000
committerDamien Miller <djm@mindrot.org>2015-06-17 22:12:04 +1000
commitaff3e94c0d75d0d0fa84ea392b50ab04f8c57905 (patch)
tree665b0614a5452d2050fcdf0288139697609aea2b /auth2-pubkey.c
parent97e2e1596c202a4693468378b16b2353fd2d6c5e (diff)
upstream commit
Make the arguments to match_principals_command() similar to match_principals_file(), by changing the last argument a struct sshkey_cert * and dereferencing key->cert in the caller. No functional change. ok djm@ Upstream-ID: 533f99b844b21b47342b32b62e198dfffcf8651c
Diffstat (limited to 'auth2-pubkey.c')
-rw-r--r--auth2-pubkey.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/auth2-pubkey.c b/auth2-pubkey.c
index c4e80b01..c820c281 100644
--- a/auth2-pubkey.c
+++ b/auth2-pubkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2-pubkey.c,v 1.51 2015/05/21 06:43:30 djm Exp $ */
+/* $OpenBSD: auth2-pubkey.c,v 1.52 2015/06/15 18:42:19 jsing Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -624,7 +624,7 @@ match_principals_file(char *file, struct passwd *pw, struct sshkey_cert *cert)
* returns 1 if the principal is allowed or 0 otherwise.
*/
static int
-match_principals_command(struct passwd *user_pw, struct sshkey *key)
+match_principals_command(struct passwd *user_pw, struct sshkey_cert *cert)
{
FILE *f = NULL;
int ok, found_principal = 0;
@@ -689,7 +689,7 @@ match_principals_command(struct passwd *user_pw, struct sshkey *key)
uid_swapped = 1;
temporarily_use_uid(pw);
- ok = process_principals(f, NULL, pw, key->cert);
+ ok = process_principals(f, NULL, pw, cert);
if (exited_cleanly(pid, "AuthorizedPrincipalsCommand", command) != 0)
goto out;
@@ -857,7 +857,7 @@ user_cert_trusted_ca(struct passwd *pw, Key *key)
found_principal = 1;
}
/* Try querying command if specified */
- if (!found_principal && match_principals_command(pw, key))
+ if (!found_principal && match_principals_command(pw, key->cert))
found_principal = 1;
/* If principals file or command specify, then require a match here */
if (!found_principal && (principals_file != NULL ||