[SCM] Samba Shared Repository - branch master updated
Andreas Schneider
asn at samba.org
Fri Aug 19 11:31:04 UTC 2016
The branch, master has been updated
via be099e4 winbindd: Introduce helper function for winbindd_cache.tdb directory
via 5dd79dc docs: Clarify description for cache, lock and state directory settings
from 98ea4a2 pvfs_open win10 fix, need return SMB2_CREATE_TAG_QFID
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit be099e4f767a37ce8eccf31a8ad1b36441e7d3cd
Author: Christof Schmitt <cs at samba.org>
Date: Thu Aug 18 14:01:50 2016 -0700
winbindd: Introduce helper function for winbindd_cache.tdb directory
Also add a comment why the file is placed in the state directory.
Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Fri Aug 19 13:30:23 CEST 2016 on sn-devel-144
commit 5dd79dc1282ad3090fb34079a8ed7d1d93a39a50
Author: Christof Schmitt <cs at samba.org>
Date: Thu Aug 18 13:46:52 2016 -0700
docs: Clarify description for cache, lock and state directory settings
Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
-----------------------------------------------------------------------
Summary of changes:
docs-xml/smbdotconf/misc/cachedirectory.xml | 7 +++++--
docs-xml/smbdotconf/misc/lockdirectory.xml | 4 ++++
docs-xml/smbdotconf/misc/statedirectory.xml | 2 +-
source3/winbindd/winbindd_cache.c | 19 ++++++++++++++-----
4 files changed, 24 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/docs-xml/smbdotconf/misc/cachedirectory.xml b/docs-xml/smbdotconf/misc/cachedirectory.xml
index 6ffda0b..21d7d94 100644
--- a/docs-xml/smbdotconf/misc/cachedirectory.xml
+++ b/docs-xml/smbdotconf/misc/cachedirectory.xml
@@ -12,8 +12,11 @@
<parameter moreinfo="none">cache directory</parameter> options.
</para>
- <para> This option specifies the directory where TDB files containing
- non-persistent data will be stored.
+ <para>This option specifies the directory for storing TDB
+ files containing non-persistent data that will be kept across
+ service restarts. The directory should be placed on persistent
+ storage, but the data can be safely deleted by an
+ administrator.
</para>
</description>
diff --git a/docs-xml/smbdotconf/misc/lockdirectory.xml b/docs-xml/smbdotconf/misc/lockdirectory.xml
index 738de2e..f8f64ff 100644
--- a/docs-xml/smbdotconf/misc/lockdirectory.xml
+++ b/docs-xml/smbdotconf/misc/lockdirectory.xml
@@ -14,6 +14,10 @@
Note: This option can not be set inside registry
configurations.
</para>
+ <para>The files placed in this directory are not required
+ across service restarts and can be safely placed on volatile
+ storage (e.g. tmpfs in Linux)</para>
+
</description>
<value type="default">&pathconfig.LOCKDIR;</value>
diff --git a/docs-xml/smbdotconf/misc/statedirectory.xml b/docs-xml/smbdotconf/misc/statedirectory.xml
index 084f145..2f2b064 100644
--- a/docs-xml/smbdotconf/misc/statedirectory.xml
+++ b/docs-xml/smbdotconf/misc/statedirectory.xml
@@ -13,7 +13,7 @@
</para>
<para> This option specifies the directory where TDB files containing
- persistent data will be stored.
+ important persistent data will be stored.
</para>
</description>
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index b2c0ae2..b921b75 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -111,6 +111,15 @@ void (*smb_panic_fn)(const char *const why) = smb_panic;
static struct winbind_cache *wcache;
+static char *wcache_path(void)
+{
+ /*
+ * Data needs to be kept persistent in state directory for
+ * running with "winbindd offline logon".
+ */
+ return state_path("winbindd_cache.tdb");
+}
+
/* get the winbind_cache structure */
static struct winbind_cache *get_cache(struct winbindd_domain *domain)
{
@@ -3195,7 +3204,7 @@ bool init_wcache(void)
if (wcache->tdb != NULL)
return true;
- db_path = state_path("winbindd_cache.tdb");
+ db_path = wcache_path();
if (db_path == NULL) {
return false;
}
@@ -3247,7 +3256,7 @@ bool initialize_winbindd_cache(void)
tdb_close(wcache->tdb);
wcache->tdb = NULL;
- db_path = state_path("winbindd_cache.tdb");
+ db_path = wcache_path();
if (db_path == NULL) {
return false;
}
@@ -3384,7 +3393,7 @@ void wcache_flush_cache(void)
return;
}
- db_path = state_path("winbindd_cache.tdb");
+ db_path = wcache_path();
if (db_path == NULL) {
return;
}
@@ -4281,7 +4290,7 @@ int winbindd_validate_cache(void)
DEBUG(10, ("winbindd_validate_cache: replacing panic function\n"));
smb_panic_fn = validate_panic;
- tdb_path = state_path("winbindd_cache.tdb");
+ tdb_path = wcache_path();
if (tdb_path == NULL) {
goto done;
}
@@ -4352,7 +4361,7 @@ int winbindd_validate_cache_nobackup(void)
DEBUG(10, ("winbindd_validate_cache: replacing panic function\n"));
smb_panic_fn = validate_panic;
- tdb_path = state_path("winbindd_cache.tdb");
+ tdb_path = wcache_path();
if (tdb_path == NULL) {
goto err_panic_restore;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list