s3: use TDB_INCOMPATIBLE_HASH (the jenkins hash) on all TDB_CLEAR_IF_FIRST tdb's.
[obnox/samba-ctdb.git] / source3 / winbindd / winbindd_cache.c
index 141ceb1b5ec6b32cbbe39f5e1e93029d1248db69..28f6b57c0c2a14aa0eecdd7eecbb77ec8eb7331f 100644 (file)
@@ -2539,7 +2539,9 @@ bool init_wcache(void)
        /* when working offline we must not clear the cache on restart */
        wcache->tdb = tdb_open_log(cache_path("winbindd_cache.tdb"),
                                WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE, 
-                               lp_winbind_offline_logon() ? TDB_DEFAULT : (TDB_DEFAULT | TDB_CLEAR_IF_FIRST), 
+                               ( lp_winbind_offline_logon()
+                                 ? TDB_DEFAULT
+                                 : TDB_DEFAULT | TDB_CLEAR_IF_FIRST | TDB_INCOMPATIBLE_HASH ),
                                O_RDWR|O_CREAT, 0600);
 
        if (wcache->tdb == NULL) {
@@ -2867,7 +2869,9 @@ void wcache_flush_cache(void)
        /* when working offline we must not clear the cache on restart */
        wcache->tdb = tdb_open_log(cache_path("winbindd_cache.tdb"),
                                WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE, 
-                               lp_winbind_offline_logon() ? TDB_DEFAULT : (TDB_DEFAULT | TDB_CLEAR_IF_FIRST), 
+                               ( lp_winbind_offline_logon()
+                                 ? TDB_DEFAULT
+                                 : TDB_DEFAULT | TDB_CLEAR_IF_FIRST | TDB_INCOMPATIBLE_HASH ),
                                O_RDWR|O_CREAT, 0600);
 
        if (!wcache->tdb) {
@@ -3705,7 +3709,7 @@ int winbindd_validate_cache(void)
                           WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE,
                           ( lp_winbind_offline_logon() 
                             ? TDB_DEFAULT 
-                            : TDB_DEFAULT | TDB_CLEAR_IF_FIRST ),
+                            : TDB_DEFAULT | TDB_CLEAR_IF_FIRST | TDB_INCOMPATIBLE_HASH ),
                           O_RDWR|O_CREAT, 
                           0600);
        if (!tdb) {