summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-01-24 18:50:31 +0100
committerVolker Lendecke <vl@samba.org>2010-01-24 20:32:17 +0100
commitaa837d4aeed46a0ddbf6545d7e0474a0f5d86cec (patch)
treed9e43a3eb2cdd3be95ad6378acbea912274b04a9 /source3/lib
parentbff48738a88875c5279e70f2886e894584f0cd7f (diff)
downloadsamba-aa837d4aeed46a0ddbf6545d7e0474a0f5d86cec.tar.gz
samba-aa837d4aeed46a0ddbf6545d7e0474a0f5d86cec.tar.bz2
samba-aa837d4aeed46a0ddbf6545d7e0474a0f5d86cec.zip
s3: add libnetapi_set_use_ccache()
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/netapi/cm.c4
-rw-r--r--source3/lib/netapi/netapi.c6
-rw-r--r--source3/lib/netapi/netapi.h6
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);
/****************************************************************