diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: monitor.c,v 1.62 2005/01/30 11:18:08 dtucker Exp $"); | 28 | RCSID("$OpenBSD: monitor.c,v 1.63 2005/03/10 22:01:05 deraadt Exp $"); |
29 | 29 | ||
30 | #include <openssl/dh.h> | 30 | #include <openssl/dh.h> |
31 | 31 | ||
@@ -317,6 +317,8 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor) | |||
317 | authctxt = _authctxt; | 317 | authctxt = _authctxt; |
318 | memset(authctxt, 0, sizeof(*authctxt)); | 318 | memset(authctxt, 0, sizeof(*authctxt)); |
319 | 319 | ||
320 | authctxt->loginmsg = &loginmsg; | ||
321 | |||
320 | if (compat20) { | 322 | if (compat20) { |
321 | mon_dispatch = mon_dispatch_proto20; | 323 | mon_dispatch = mon_dispatch_proto20; |
322 | 324 | ||
@@ -882,8 +884,8 @@ int | |||
882 | mm_answer_pam_query(int sock, Buffer *m) | 884 | mm_answer_pam_query(int sock, Buffer *m) |
883 | { | 885 | { |
884 | char *name, *info, **prompts; | 886 | char *name, *info, **prompts; |
885 | u_int num, *echo_on; | 887 | u_int i, num, *echo_on; |
886 | int i, ret; | 888 | int ret; |
887 | 889 | ||
888 | debug3("%s", __func__); | 890 | debug3("%s", __func__); |
889 | sshpam_authok = NULL; | 891 | sshpam_authok = NULL; |
@@ -916,8 +918,8 @@ int | |||
916 | mm_answer_pam_respond(int sock, Buffer *m) | 918 | mm_answer_pam_respond(int sock, Buffer *m) |
917 | { | 919 | { |
918 | char **resp; | 920 | char **resp; |
919 | u_int num; | 921 | u_int i, num; |
920 | int i, ret; | 922 | int ret; |
921 | 923 | ||
922 | debug3("%s", __func__); | 924 | debug3("%s", __func__); |
923 | sshpam_authok = NULL; | 925 | sshpam_authok = NULL; |
@@ -991,7 +993,7 @@ mm_answer_keyallowed(int sock, Buffer *m) | |||
991 | debug3("%s: key_from_blob: %p", __func__, key); | 993 | debug3("%s: key_from_blob: %p", __func__, key); |
992 | 994 | ||
993 | if (key != NULL && authctxt->valid) { | 995 | if (key != NULL && authctxt->valid) { |
994 | switch(type) { | 996 | switch (type) { |
995 | case MM_USERKEY: | 997 | case MM_USERKEY: |
996 | allowed = options.pubkey_authentication && | 998 | allowed = options.pubkey_authentication && |
997 | user_key_allowed(authctxt->pw, key); | 999 | user_key_allowed(authctxt->pw, key); |
@@ -1538,7 +1540,6 @@ mm_answer_audit_event(int socket, Buffer *m) | |||
1538 | debug3("%s entering", __func__); | 1540 | debug3("%s entering", __func__); |
1539 | 1541 | ||
1540 | event = buffer_get_int(m); | 1542 | event = buffer_get_int(m); |
1541 | buffer_free(m); | ||
1542 | switch(event) { | 1543 | switch(event) { |
1543 | case SSH_AUTH_FAIL_PUBKEY: | 1544 | case SSH_AUTH_FAIL_PUBKEY: |
1544 | case SSH_AUTH_FAIL_HOSTBASED: | 1545 | case SSH_AUTH_FAIL_HOSTBASED: |
@@ -1567,7 +1568,6 @@ mm_answer_audit_command(int socket, Buffer *m) | |||
1567 | /* sanity check command, if so how? */ | 1568 | /* sanity check command, if so how? */ |
1568 | audit_run_command(cmd); | 1569 | audit_run_command(cmd); |
1569 | xfree(cmd); | 1570 | xfree(cmd); |
1570 | buffer_free(m); | ||
1571 | return (0); | 1571 | return (0); |
1572 | } | 1572 | } |
1573 | #endif /* SSH_AUDIT_EVENTS */ | 1573 | #endif /* SSH_AUDIT_EVENTS */ |
@@ -1640,6 +1640,7 @@ mm_get_kex(Buffer *m) | |||
1640 | kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; | 1640 | kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; |
1641 | #ifdef GSSAPI | 1641 | #ifdef GSSAPI |
1642 | kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server; | 1642 | kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server; |
1643 | kex->kex[KEX_GSS_GEX_SHA1] = kexgss_server; | ||
1643 | #endif | 1644 | #endif |
1644 | kex->server = 1; | 1645 | kex->server = 1; |
1645 | kex->hostkey_type = buffer_get_int(m); | 1646 | kex->hostkey_type = buffer_get_int(m); |
@@ -1938,10 +1939,13 @@ mm_answer_gss_userok(int sock, Buffer *m) | |||
1938 | int | 1939 | int |
1939 | mm_answer_gss_sign(int socket, Buffer *m) | 1940 | mm_answer_gss_sign(int socket, Buffer *m) |
1940 | { | 1941 | { |
1941 | gss_buffer_desc data, hash; | 1942 | gss_buffer_desc data; |
1943 | gss_buffer_desc hash = GSS_C_EMPTY_BUFFER; | ||
1942 | OM_uint32 major, minor; | 1944 | OM_uint32 major, minor; |
1945 | u_int len; | ||
1943 | 1946 | ||
1944 | data.value = buffer_get_string(m, &data.length); | 1947 | data.value = buffer_get_string(m, &len); |
1948 | data.length = len; | ||
1945 | if (data.length != 20) | 1949 | if (data.length != 20) |
1946 | fatal("%s: data length incorrect: %d", __func__, data.length); | 1950 | fatal("%s: data length incorrect: %d", __func__, data.length); |
1947 | 1951 | ||