diff options
author | Gerald Carter <jerry@samba.org> | 2006-07-19 19:20:28 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2006-07-19 19:20:28 +0000 |
commit | cb10e23454954118034c133a30849394da73752d (patch) | |
tree | 796e8b041848b65f1d9b73df31daa370e4a65117 /source/nsswitch/winbindd_cache.c | |
parent | b4bb14b5950debe92edfb9cea233833cd8d768b6 (diff) | |
download | samba-cb10e23454954118034c133a30849394da73752d.tar.gz samba-cb10e23454954118034c133a30849394da73752d.tar.xz samba-cb10e23454954118034c133a30849394da73752d.zip |
r17143: svn merge -r17091:17138 ../SAMBA_3_0_23/
Diffstat (limited to 'source/nsswitch/winbindd_cache.c')
-rw-r--r-- | source/nsswitch/winbindd_cache.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c index 5cbaa778052..b267a3f7705 100644 --- a/source/nsswitch/winbindd_cache.c +++ b/source/nsswitch/winbindd_cache.c @@ -1891,7 +1891,8 @@ static BOOL init_wcache(void) /* when working offline we must not clear the cache on restart */ wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE, - TDB_DEFAULT /*TDB_CLEAR_IF_FIRST*/, O_RDWR|O_CREAT, 0600); + lp_winbind_offline_logon() ? TDB_DEFAULT : (TDB_DEFAULT | TDB_CLEAR_IF_FIRST), + O_RDWR|O_CREAT, 0600); if (wcache->tdb == NULL) { DEBUG(0,("Failed to open winbindd_cache.tdb!\n")); @@ -2133,7 +2134,8 @@ void wcache_flush_cache(void) /* when working offline we must not clear the cache on restart */ wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE, - TDB_DEFAULT /* TDB_CLEAR_IF_FIRST */, O_RDWR|O_CREAT, 0600); + lp_winbind_offline_logon() ? TDB_DEFAULT : (TDB_DEFAULT | TDB_CLEAR_IF_FIRST), + O_RDWR|O_CREAT, 0600); if (!wcache->tdb) { DEBUG(0,("Failed to open winbindd_cache.tdb!\n")); |