diff options
author | Damien Miller <djm@mindrot.org> | 2001-03-30 10:48:31 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-03-30 10:48:31 +1000 |
commit | 5d57e5073034b41c11366153f3853143c9ce07c0 (patch) | |
tree | 689156a83c58623993d7047c485983901f9c1abe /auth2.c | |
parent | 23e526e27199f3ae079ee302581221b49d3e6772 (diff) |
- OpenBSD CVS Sync
- markus@cvs.openbsd.org 2001/03/28 22:43:31
[auth.h auth2.c auth2-chall.c]
check auth_root_allowed for kbd-int auth, too.
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: auth2.c,v 1.48 2001/03/21 11:43:44 markus Exp $"); | 26 | RCSID("$OpenBSD: auth2.c,v 1.49 2001/03/28 22:43:31 markus Exp $"); |
27 | 27 | ||
28 | #include <openssl/evp.h> | 28 | #include <openssl/evp.h> |
29 | 29 | ||
@@ -81,6 +81,7 @@ char *authmethods_get(void); | |||
81 | 81 | ||
82 | /* auth */ | 82 | /* auth */ |
83 | void userauth_banner(void); | 83 | void userauth_banner(void); |
84 | void userauth_reply(Authctxt *authctxt, int authenticated); | ||
84 | int userauth_none(Authctxt *authctxt); | 85 | int userauth_none(Authctxt *authctxt); |
85 | int userauth_passwd(Authctxt *authctxt); | 86 | int userauth_passwd(Authctxt *authctxt); |
86 | int userauth_pubkey(Authctxt *authctxt); | 87 | int userauth_pubkey(Authctxt *authctxt); |
@@ -231,6 +232,16 @@ input_userauth_request(int type, int plen, void *ctxt) | |||
231 | debug2("input_userauth_request: try method %s", method); | 232 | debug2("input_userauth_request: try method %s", method); |
232 | authenticated = m->userauth(authctxt); | 233 | authenticated = m->userauth(authctxt); |
233 | } | 234 | } |
235 | userauth_finish(authctxt, authenticated, method); | ||
236 | |||
237 | xfree(service); | ||
238 | xfree(user); | ||
239 | xfree(method); | ||
240 | } | ||
241 | |||
242 | void | ||
243 | userauth_finish(Authctxt *authctxt, int authenticated, char *method) | ||
244 | { | ||
234 | if (!authctxt->valid && authenticated) | 245 | if (!authctxt->valid && authenticated) |
235 | fatal("INTERNAL ERROR: authenticated invalid user %s", | 246 | fatal("INTERNAL ERROR: authenticated invalid user %s", |
236 | authctxt->user); | 247 | authctxt->user); |
@@ -251,10 +262,6 @@ input_userauth_request(int type, int plen, void *ctxt) | |||
251 | 262 | ||
252 | if (!authctxt->postponed) | 263 | if (!authctxt->postponed) |
253 | userauth_reply(authctxt, authenticated); | 264 | userauth_reply(authctxt, authenticated); |
254 | |||
255 | xfree(service); | ||
256 | xfree(user); | ||
257 | xfree(method); | ||
258 | } | 265 | } |
259 | 266 | ||
260 | void | 267 | void |