auth/gensec: Remove unneeded cli_credentials_set_conf() call
[nivanova/samba-autobuild/.git] / source4 / auth / gensec / gensec_gssapi.c
index a37a0a91e444052a2e30c1df17fa0f955cdb5cab..3ec1cd495d4895f4875eba9772a52fe17e94fe4e 100644 (file)
@@ -1311,16 +1311,18 @@ static NTSTATUS gensec_gssapi_session_info(struct gensec_security *gensec_securi
                const char *error_string;
 
                DEBUG(10, ("gensec_gssapi: delegated credentials supplied by client\n"));
-               session_info->credentials = cli_credentials_init(session_info);
-               if (!session_info->credentials) {
+
+               /*
+                * Create anonymous credentials for now.
+                *
+                * We will update them with the provided client gss creds.
+                */
+               session_info->credentials = cli_credentials_init_anon(session_info);
+               if (session_info->credentials == NULL) {
                        talloc_free(tmp_ctx);
                        return NT_STATUS_NO_MEMORY;
                }
 
-               cli_credentials_set_conf(session_info->credentials, gensec_security->settings->lp_ctx);
-               /* Just so we don't segfault trying to get at a username */
-               cli_credentials_set_anonymous(session_info->credentials);
-               
                ret = cli_credentials_set_client_gss_creds(session_info->credentials, 
                                                           gensec_security->settings->lp_ctx,
                                                           gensec_gssapi_state->delegated_cred_handle,