aboutsummaryrefslogtreecommitdiff
path: root/lib/krb5.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/krb5.c')
-rw-r--r--lib/krb5.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/krb5.c b/lib/krb5.c
index 65869c99d..992da5456 100644
--- a/lib/krb5.c
+++ b/lib/krb5.c
@@ -152,7 +152,10 @@ krb5_auth(void *app_data, struct connectdata *conn)
curl_socklen_t l = sizeof(conn->local_addr);
struct SessionHandle *data = conn->data;
CURLcode result;
- const char *service = "ftp", *srv_host = "host";
+ const char *service = data->set.str[STRING_SERVICE_NAME] ?
+ data->set.str[STRING_SERVICE_NAME] :
+ "ftp";
+ const char *srv_host = "host";
gss_buffer_desc input_buffer, output_buffer, _gssresp, *gssresp;
OM_uint32 maj, min;
gss_name_t gssname;
@@ -180,9 +183,9 @@ krb5_auth(void *app_data, struct connectdata *conn)
/* this really shouldn't be repeated here, but can't help it */
if(service == srv_host) {
result = Curl_ftpsendf(conn, "AUTH GSSAPI");
-
if(result)
return -2;
+
if(Curl_GetFTPResponse(&nread, conn, NULL))
return -1;