summaryrefslogtreecommitdiff
path: root/source3/libsmb/libsmb_context.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-01-26 10:51:32 +0100
committerVolker Lendecke <vl@samba.org>2010-01-26 11:45:56 +0100
commit08fa57335a2e1ac44764330c0d95aaf099aa0c15 (patch)
tree8d1a2010f88645078b4b3bb4b8e7d9d956fd67c0 /source3/libsmb/libsmb_context.c
parent1e2e92f54d90c59a2a340728d3adc3cac1dd8133 (diff)
downloadsamba-08fa57335a2e1ac44764330c0d95aaf099aa0c15.tar.gz
s3: Enable use of ccache by default for libsmbclient
Disable this by setting the environment variable LIBSMBCLIENT_NO_CCACHE, which has the advantage over an smb.conf option to be easily settable per application.
Diffstat (limited to 'source3/libsmb/libsmb_context.c')
-rw-r--r--source3/libsmb/libsmb_context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c
index 2e56911f70..c44d92c99a 100644
--- a/source3/libsmb/libsmb_context.c
+++ b/source3/libsmb/libsmb_context.c
@@ -173,6 +173,9 @@ smbc_new_context(void)
smbc_setOptionBrowseMaxLmbCount(context, 3); /* # LMBs to query */
smbc_setOptionUrlEncodeReaddirEntries(context, False);
smbc_setOptionOneSharePerServer(context, False);
+ if (getenv("LIBSMBCLIENT_NO_CCACHE") == NULL) {
+ smbc_setOptionUseCCache(context, true);
+ }
smbc_setFunctionAuthData(context, SMBC_get_auth_data);
smbc_setFunctionCheckServer(context, SMBC_check_server);