diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/netapi/cm.c | 4 | ||||
-rw-r--r-- | source3/lib/netapi/netapi.c | 6 | ||||
-rw-r--r-- | source3/lib/netapi/netapi.h | 6 |
3 files changed, 16 insertions, 0 deletions
diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c index 9baba7b824..3a624bf7e8 100644 --- a/source3/lib/netapi/cm.c +++ b/source3/lib/netapi/cm.c @@ -55,6 +55,10 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx, set_cmdline_auth_info_fallback_after_kerberos(auth_info, true); } + if (ctx->use_ccache) { + set_cmdline_auth_info_use_ccache(auth_info, true); + } + cli_ipc = cli_cm_open(ctx, NULL, server_name, "IPC$", auth_info, diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c index e80879a1d2..bde6fd823f 100644 --- a/source3/lib/netapi/netapi.c +++ b/source3/lib/netapi/netapi.c @@ -250,6 +250,12 @@ NET_API_STATUS libnetapi_set_use_kerberos(struct libnetapi_ctx *ctx) return NET_API_STATUS_SUCCESS; } +NET_API_STATUS libnetapi_set_use_ccache(struct libnetapi_ctx *ctx) +{ + ctx->use_ccache = true; + return NET_API_STATUS_SUCCESS; +} + /**************************************************************** ****************************************************************/ diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 96cf225d0c..8976ebd4eb 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -1318,6 +1318,7 @@ struct libnetapi_ctx { char *password; char *krb5_cc_env; int use_kerberos; + int use_ccache; int disable_policy_handle_cache; void *private_data; @@ -1370,6 +1371,11 @@ NET_API_STATUS libnetapi_set_use_kerberos(struct libnetapi_ctx *ctx); /**************************************************************** ****************************************************************/ +NET_API_STATUS libnetapi_set_use_ccache(struct libnetapi_ctx *ctx); + +/**************************************************************** +****************************************************************/ + const char *libnetapi_errstr(NET_API_STATUS status); /**************************************************************** |