s3: Enable use of ccache by default for libsmbclient
authorVolker Lendecke <vl@samba.org>
Tue, 26 Jan 2010 09:51:32 +0000 (10:51 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 26 Jan 2010 10:45:56 +0000 (11:45 +0100)
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.

source3/libsmb/libsmb_context.c

index 2e56911f70fc6074e5ffdb7fbc5a974b9fbe107c..c44d92c99a4a7362beb49f5eb5729ced07cae430 100644 (file)
@@ -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);