static char *want_feature_list = NULL;
static DATA_BLOB session_key;
-
+ bool include_krb5_default_ccache = false;
TALLOC_CTX *mem_ctx;
mem_ctx = talloc_named(NULL, 0, "manage_gensec_request internal mem_ctx");
* NTLMSSP_CLIENT_1 for now.
*/
use_cached_creds = false;
+ if (opt_username == NULL && state->set_password == NULL) {
+ include_krb5_default_ccache = true;
+ }
FALL_THROUGH;
case NTLMSSP_CLIENT_1:
/* setup the client side */
GENSEC_FEATURE_NTLM_CCACHE);
} else if (state->set_password) {
cli_credentials_set_password(creds, state->set_password, CRED_SPECIFIED);
+ } else if (include_krb5_default_ccache) {
+ const char *error_string = NULL;
+ int rc;
+
+ rc = cli_credentials_set_ccache(creds,
+ lp_ctx,
+ NULL,
+ CRED_SPECIFIED,
+ &error_string);
+ if (rc != 0) {
+ fprintf(stderr,
+ "Warning reading default "
+ "krb5 credentials cache: %s\n",
+ error_string);
+ }
} else {
cli_credentials_set_password_callback(creds, get_password);
}