diff options
author | Seonah Moon <seonah1.moon@samsung.com> | 2016-09-23 13:49:53 +0900 |
---|---|---|
committer | Seonah Moon <seonah1.moon@samsung.com> | 2016-09-23 13:50:15 +0900 |
commit | 3e62527ed71a7a362d7ec321e7f026edab35f8e2 (patch) | |
tree | 7f3b26146600554e22d60afbe69035821056f299 /lib/socks_gssapi.c | |
parent | 0a710b32648c435f792f5993fdefa2d96f802580 (diff) | |
download | curl-3e62527ed71a7a362d7ec321e7f026edab35f8e2.tar.gz curl-3e62527ed71a7a362d7ec321e7f026edab35f8e2.tar.bz2 curl-3e62527ed71a7a362d7ec321e7f026edab35f8e2.zip |
Imported Upstream version 7.50.2upstream/7.50.2
Change-Id: I91c6040940a21b2bebab9d6cab11d50767b7bac4
Diffstat (limited to 'lib/socks_gssapi.c')
-rw-r--r-- | lib/socks_gssapi.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c index 09457aecd..369245a61 100644 --- a/lib/socks_gssapi.c +++ b/lib/socks_gssapi.c @@ -6,7 +6,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2009, 2011, Markus Moeller, <markus_moeller@compuserve.com> - * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 2012 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -32,9 +32,10 @@ #include "timeval.h" #include "socks.h" #include "warnless.h" + +/* The last 3 #include files should be in this order */ #include "curl_printf.h" #include "curl_memory.h" -/* The last #include file should be: */ #include "memdebug.h" static gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT; @@ -42,7 +43,7 @@ static gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT; /* * Helper GSS-API error functions. */ -static int check_gss_err(struct SessionHandle *data, +static int check_gss_err(struct Curl_easy *data, OM_uint32 major_status, OM_uint32 minor_status, const char* function) @@ -101,7 +102,7 @@ static int check_gss_err(struct SessionHandle *data, CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, struct connectdata *conn) { - struct SessionHandle *data = conn->data; + struct Curl_easy *data = conn->data; curl_socket_t sock = conn->sock[sockindex]; CURLcode code; ssize_t actualread; @@ -120,7 +121,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, unsigned short us_length; char *user=NULL; unsigned char socksreq[4]; /* room for GSS-API exchange header only */ - char *serviceptr = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE]; + const char *serviceptr = data->set.str[STRING_PROXY_SERVICE_NAME] ? + data->set.str[STRING_PROXY_SERVICE_NAME] : "rcmd"; /* GSS-API request looks like * +----+------+-----+----------------+ |