summaryrefslogtreecommitdiff
path: root/auth2-hostbased.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2013-09-14 15:43:03 +0100
committerColin Watson <cjwatson@debian.org>2013-09-14 15:43:03 +0100
commit8faf8c84430cf3c19705b1d9f8889d256e7fd1fd (patch)
treee6cb74192adb00fda5e4d1457547851d7e0d86af /auth2-hostbased.c
parent328b60656f29db6306994d7498dede386ec2d1c3 (diff)
parentc41345ad7ee5a22689e2c009595e85fa27b4b39a (diff)
merge 6.3p1
Diffstat (limited to 'auth2-hostbased.c')
-rw-r--r--auth2-hostbased.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/auth2-hostbased.c b/auth2-hostbased.c
index cdf442f97..a344dcc1f 100644
--- a/auth2-hostbased.c
+++ b/auth2-hostbased.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-hostbased.c,v 1.14 2010/08/04 05:42:47 djm Exp $ */ 1/* $OpenBSD: auth2-hostbased.c,v 1.16 2013/06/21 00:34:49 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -116,6 +116,10 @@ userauth_hostbased(Authctxt *authctxt)
116#ifdef DEBUG_PK 116#ifdef DEBUG_PK
117 buffer_dump(&b); 117 buffer_dump(&b);
118#endif 118#endif
119
120 pubkey_auth_info(authctxt, key,
121 "client user \"%.100s\", client host \"%.100s\"", cuser, chost);
122
119 /* test for allowed key and correct signature */ 123 /* test for allowed key and correct signature */
120 authenticated = 0; 124 authenticated = 0;
121 if (PRIVSEP(hostbased_key_allowed(authctxt->pw, cuser, chost, key)) && 125 if (PRIVSEP(hostbased_key_allowed(authctxt->pw, cuser, chost, key)) &&
@@ -128,11 +132,11 @@ done:
128 debug2("userauth_hostbased: authenticated %d", authenticated); 132 debug2("userauth_hostbased: authenticated %d", authenticated);
129 if (key != NULL) 133 if (key != NULL)
130 key_free(key); 134 key_free(key);
131 xfree(pkalg); 135 free(pkalg);
132 xfree(pkblob); 136 free(pkblob);
133 xfree(cuser); 137 free(cuser);
134 xfree(chost); 138 free(chost);
135 xfree(sig); 139 free(sig);
136 return authenticated; 140 return authenticated;
137} 141}
138 142
@@ -207,7 +211,7 @@ hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
207 verbose("Accepted %s public key %s from %s@%s", 211 verbose("Accepted %s public key %s from %s@%s",
208 key_type(key), fp, cuser, lookup); 212 key_type(key), fp, cuser, lookup);
209 } 213 }
210 xfree(fp); 214 free(fp);
211 } 215 }
212 216
213 return (host_status == HOST_OK); 217 return (host_status == HOST_OK);