diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 54 |
1 files changed, 1 insertions, 53 deletions
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: monitor.c,v 1.44 2003/06/24 08:23:46 markus Exp $"); | 28 | RCSID("$OpenBSD: monitor.c,v 1.45 2003/07/22 13:35:22 markus Exp $"); |
29 | 29 | ||
30 | #include <openssl/dh.h> | 30 | #include <openssl/dh.h> |
31 | 31 | ||
@@ -124,9 +124,6 @@ int mm_answer_pam_respond(int, Buffer *); | |||
124 | int mm_answer_pam_free_ctx(int, Buffer *); | 124 | int mm_answer_pam_free_ctx(int, Buffer *); |
125 | #endif | 125 | #endif |
126 | 126 | ||
127 | #ifdef KRB4 | ||
128 | int mm_answer_krb4(int, Buffer *); | ||
129 | #endif | ||
130 | #ifdef KRB5 | 127 | #ifdef KRB5 |
131 | int mm_answer_krb5(int, Buffer *); | 128 | int mm_answer_krb5(int, Buffer *); |
132 | #endif | 129 | #endif |
@@ -222,9 +219,6 @@ struct mon_table mon_dispatch_proto15[] = { | |||
222 | {MONITOR_REQ_PAM_RESPOND, MON_ISAUTH, mm_answer_pam_respond}, | 219 | {MONITOR_REQ_PAM_RESPOND, MON_ISAUTH, mm_answer_pam_respond}, |
223 | {MONITOR_REQ_PAM_FREE_CTX, MON_ONCE|MON_AUTHDECIDE, mm_answer_pam_free_ctx}, | 220 | {MONITOR_REQ_PAM_FREE_CTX, MON_ONCE|MON_AUTHDECIDE, mm_answer_pam_free_ctx}, |
224 | #endif | 221 | #endif |
225 | #ifdef KRB4 | ||
226 | {MONITOR_REQ_KRB4, MON_ONCE|MON_AUTH, mm_answer_krb4}, | ||
227 | #endif | ||
228 | #ifdef KRB5 | 222 | #ifdef KRB5 |
229 | {MONITOR_REQ_KRB5, MON_ONCE|MON_AUTH, mm_answer_krb5}, | 223 | {MONITOR_REQ_KRB5, MON_ONCE|MON_AUTH, mm_answer_krb5}, |
230 | #endif | 224 | #endif |
@@ -1428,52 +1422,6 @@ mm_answer_rsa_response(int socket, Buffer *m) | |||
1428 | return (success); | 1422 | return (success); |
1429 | } | 1423 | } |
1430 | 1424 | ||
1431 | #ifdef KRB4 | ||
1432 | int | ||
1433 | mm_answer_krb4(int socket, Buffer *m) | ||
1434 | { | ||
1435 | KTEXT_ST auth, reply; | ||
1436 | char *client, *p; | ||
1437 | int success; | ||
1438 | u_int alen; | ||
1439 | |||
1440 | reply.length = auth.length = 0; | ||
1441 | |||
1442 | p = buffer_get_string(m, &alen); | ||
1443 | if (alen >= MAX_KTXT_LEN) | ||
1444 | fatal("%s: auth too large", __func__); | ||
1445 | memcpy(auth.dat, p, alen); | ||
1446 | auth.length = alen; | ||
1447 | memset(p, 0, alen); | ||
1448 | xfree(p); | ||
1449 | |||
1450 | success = options.kerberos_authentication && | ||
1451 | authctxt->valid && | ||
1452 | auth_krb4(authctxt, &auth, &client, &reply); | ||
1453 | |||
1454 | memset(auth.dat, 0, alen); | ||
1455 | buffer_clear(m); | ||
1456 | buffer_put_int(m, success); | ||
1457 | |||
1458 | if (success) { | ||
1459 | buffer_put_cstring(m, client); | ||
1460 | buffer_put_string(m, reply.dat, reply.length); | ||
1461 | if (client) | ||
1462 | xfree(client); | ||
1463 | if (reply.length) | ||
1464 | memset(reply.dat, 0, reply.length); | ||
1465 | } | ||
1466 | |||
1467 | debug3("%s: sending result %d", __func__, success); | ||
1468 | mm_request_send(socket, MONITOR_ANS_KRB4, m); | ||
1469 | |||
1470 | auth_method = "kerberos"; | ||
1471 | |||
1472 | /* Causes monitor loop to terminate if authenticated */ | ||
1473 | return (success); | ||
1474 | } | ||
1475 | #endif | ||
1476 | |||
1477 | #ifdef KRB5 | 1425 | #ifdef KRB5 |
1478 | int | 1426 | int |
1479 | mm_answer_krb5(int socket, Buffer *m) | 1427 | mm_answer_krb5(int socket, Buffer *m) |