summaryrefslogtreecommitdiff
path: root/source3/libsmb/libsmb_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/libsmb_context.c')
-rw-r--r--source3/libsmb/libsmb_context.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c
index 336172ce6f..2e56911f70 100644
--- a/source3/libsmb/libsmb_context.c
+++ b/source3/libsmb/libsmb_context.c
@@ -168,6 +168,7 @@ smbc_new_context(void)
smbc_setOptionFullTimeNames(context, False);
smbc_setOptionOpenShareMode(context, SMBC_SHAREMODE_DENY_NONE);
smbc_setOptionSmbEncryptionLevel(context, SMBC_ENCRYPTLEVEL_NONE);
+ smbc_setOptionUseCCache(context, True);
smbc_setOptionCaseSensitive(context, False);
smbc_setOptionBrowseMaxLmbCount(context, 3); /* # LMBs to query */
smbc_setOptionUrlEncodeReaddirEntries(context, False);
@@ -399,6 +400,10 @@ smbc_option_set(SMBCCTX *context,
option_value.b = (bool) va_arg(ap, int);
smbc_setOptionFallbackAfterKerberos(context, option_value.b);
+ } else if (strcmp(option_name, "use_ccache") == 0) {
+ option_value.b = (bool) va_arg(ap, int);
+ smbc_setOptionUseCCache(context, option_value.b);
+
} else if (strcmp(option_name, "no_auto_anonymous_login") == 0) {
option_value.b = (bool) va_arg(ap, int);
smbc_setOptionNoAutoAnonymousLogin(context, option_value.b);
@@ -505,6 +510,13 @@ smbc_option_get(SMBCCTX *context,
return (void *) (bool) smbc_getOptionFallbackAfterKerberos(context);
#endif
+ } else if (strcmp(option_name, "use_ccache") == 0) {
+#if defined(__intptr_t_defined) || defined(HAVE_INTPTR_T)
+ return (void *) (intptr_t) smbc_getOptionUseCCache(context);
+#else
+ return (void *) (bool) smbc_getOptionUseCCache(context);
+#endif
+
} else if (strcmp(option_name, "no_auto_anonymous_login") == 0) {
#if defined(__intptr_t_defined) || defined(HAVE_INTPTR_T)
return (void *) (intptr_t) smbc_getOptionNoAutoAnonymousLogin(context);
@@ -748,6 +760,8 @@ void smbc_set_credentials_with_fallback(SMBCCTX *context,
set_cmdline_auth_info_signing_state(auth_info, signing_state);
set_cmdline_auth_info_fallback_after_kerberos(auth_info,
smbc_getOptionFallbackAfterKerberos(context));
+ set_cmdline_auth_info_use_ccache(
+ auth_info, smbc_getOptionUseCCache(context));
set_global_myworkgroup(workgroup);
TALLOC_FREE(context->internal->auth_info);