From ced0cbb5b72bab6ad1a8393a22e6443cdbf611f1 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sat, 2 Apr 2016 06:15:29 +0100 Subject: krb5: Moved host from Curl_auth_create_gssapi_user_message() to be argument For consistency with the spnego and oauth2 code moved the setting of the host name outside of the Curl_auth_create_gssapi_user_messag() function. This will allow us to more easily override it in the future. --- lib/vauth/krb5_sspi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/vauth/krb5_sspi.c') diff --git a/lib/vauth/krb5_sspi.c b/lib/vauth/krb5_sspi.c index a1d438f50..6afd83dde 100644 --- a/lib/vauth/krb5_sspi.c +++ b/lib/vauth/krb5_sspi.c @@ -51,6 +51,7 @@ * userp [in] - The user name in the format User or Domain\User. * passdwp [in] - The user's password. * service [in] - The service type such as www, smtp, pop or imap. + * host [in] - The host name. * mutual_auth [in] - Flag specifing whether or not mutual authentication * is enabled. * chlg64 [in] - The optional base64 encoded challenge message. @@ -65,6 +66,7 @@ CURLcode Curl_auth_create_gssapi_user_message(struct SessionHandle *data, const char *userp, const char *passwdp, const char *service, + const char *host, const bool mutual_auth, const char *chlg64, struct kerberos5data *krb5, @@ -103,7 +105,7 @@ CURLcode Curl_auth_create_gssapi_user_message(struct SessionHandle *data, return CURLE_OUT_OF_MEMORY; /* Generate our SPN */ - krb5->spn = Curl_auth_build_spn(service, data->easy_conn->host.name); + krb5->spn = Curl_auth_build_spn(service, host); if(!krb5->spn) return CURLE_OUT_OF_MEMORY; -- cgit v1.2.3