diff options
author | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:34:25 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:34:25 +0000 |
commit | fa585019a79ebcb4e0202b1c33f87ff1c5c9ce1c (patch) | |
tree | 28fc9a13eaab935e4de055b561b333d67387a934 /monitor.c | |
parent | 04942aa41fa94ec6f2c3ce1d348f600f31bb7c78 (diff) | |
parent | 3e2e0ac10674d77618c4c7339e18b83ced247492 (diff) |
import openssh-4.3p2-gsskex-20060223.patch
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: monitor.c,v 1.63 2005/03/10 22:01:05 deraadt Exp $"); | 28 | RCSID("$OpenBSD: monitor.c,v 1.64 2005/10/13 22:24:31 stevesk Exp $"); |
29 | 29 | ||
30 | #include <openssl/dh.h> | 30 | #include <openssl/dh.h> |
31 | 31 | ||
@@ -849,9 +849,7 @@ mm_answer_pam_account(int sock, Buffer *m) | |||
849 | ret = do_pam_account(); | 849 | ret = do_pam_account(); |
850 | 850 | ||
851 | buffer_put_int(m, ret); | 851 | buffer_put_int(m, ret); |
852 | buffer_append(&loginmsg, "\0", 1); | 852 | buffer_put_string(m, buffer_ptr(&loginmsg), buffer_len(&loginmsg)); |
853 | buffer_put_cstring(m, buffer_ptr(&loginmsg)); | ||
854 | buffer_clear(&loginmsg); | ||
855 | 853 | ||
856 | mm_request_send(sock, MONITOR_ANS_PAM_ACCOUNT, m); | 854 | mm_request_send(sock, MONITOR_ANS_PAM_ACCOUNT, m); |
857 | 855 | ||
@@ -1850,7 +1848,7 @@ mm_answer_gss_setup_ctx(int sock, Buffer *m) | |||
1850 | buffer_clear(m); | 1848 | buffer_clear(m); |
1851 | buffer_put_int(m, major); | 1849 | buffer_put_int(m, major); |
1852 | 1850 | ||
1853 | mm_request_send(sock,MONITOR_ANS_GSSSETUP, m); | 1851 | mm_request_send(sock, MONITOR_ANS_GSSSETUP, m); |
1854 | 1852 | ||
1855 | /* Now we have a context, enable the step */ | 1853 | /* Now we have a context, enable the step */ |
1856 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 1); | 1854 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 1); |
@@ -1863,7 +1861,7 @@ mm_answer_gss_accept_ctx(int sock, Buffer *m) | |||
1863 | { | 1861 | { |
1864 | gss_buffer_desc in; | 1862 | gss_buffer_desc in; |
1865 | gss_buffer_desc out = GSS_C_EMPTY_BUFFER; | 1863 | gss_buffer_desc out = GSS_C_EMPTY_BUFFER; |
1866 | OM_uint32 major,minor; | 1864 | OM_uint32 major, minor; |
1867 | OM_uint32 flags = 0; /* GSI needs this */ | 1865 | OM_uint32 flags = 0; /* GSI needs this */ |
1868 | u_int len; | 1866 | u_int len; |
1869 | 1867 | ||
@@ -1880,7 +1878,7 @@ mm_answer_gss_accept_ctx(int sock, Buffer *m) | |||
1880 | 1878 | ||
1881 | gss_release_buffer(&minor, &out); | 1879 | gss_release_buffer(&minor, &out); |
1882 | 1880 | ||
1883 | if (major==GSS_S_COMPLETE) { | 1881 | if (major == GSS_S_COMPLETE) { |
1884 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 0); | 1882 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 0); |
1885 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1); | 1883 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1); |
1886 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSCHECKMIC, 1); | 1884 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSCHECKMIC, 1); |
@@ -1930,7 +1928,7 @@ mm_answer_gss_userok(int sock, Buffer *m) | |||
1930 | debug3("%s: sending result %d", __func__, authenticated); | 1928 | debug3("%s: sending result %d", __func__, authenticated); |
1931 | mm_request_send(sock, MONITOR_ANS_GSSUSEROK, m); | 1929 | mm_request_send(sock, MONITOR_ANS_GSSUSEROK, m); |
1932 | 1930 | ||
1933 | auth_method="gssapi-with-mic"; | 1931 | auth_method = "gssapi-with-mic"; |
1934 | 1932 | ||
1935 | /* Monitor loop will terminate if authenticated */ | 1933 | /* Monitor loop will terminate if authenticated */ |
1936 | return (authenticated); | 1934 | return (authenticated); |