]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3-winbindd: make sure we always have WINBINDD_CACHE_VERSION in winbindd_cache.tdb
authorGünther Deschner <gd@samba.org>
Fri, 25 Jul 2025 20:50:08 +0000 (22:50 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 8 Dec 2025 09:59:58 +0000 (09:59 +0000)
Guenther

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15963

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Dec  8 09:59:58 UTC 2025 on atb-devel-224

selftest/knownfail
source3/winbindd/winbindd_cache.c

index 19955ec8ca3bea87661e4c1f61f331b3700df27c..ab2d79d7114edb6ee29eafd4ef5e4ce84921471b 100644 (file)
 
 # We currently don't send referrals for LDAP modify of non-replicated attrs
 ^samba4.ldap.rodc.python\(rodc\).__main__.RodcTests.test_modify_nonreplicated.*
-
-# Currently winbindd_cache.tdb is not working as expected
-^samba3.winbind_cache_sanity.WINBINDD_CACHE_VERSION.*
index 4deb998f63c73272cd66b73e0aa8a6f0bd50b089..3d908e4db0860083d77dd8988f3f7f17d14323fc 100644 (file)
@@ -3171,6 +3171,7 @@ static TDB_CONTEXT *wcache_open(void)
 {
        char *db_path;
        TDB_CONTEXT *tdb = NULL;
+       bool wcache_wiped = !lp_winbind_offline_logon();
 
        db_path = wcache_path();
        if (db_path == NULL) {
@@ -3189,6 +3190,12 @@ static TDB_CONTEXT *wcache_open(void)
                           0600);
        TALLOC_FREE(db_path);
 
+       if (wcache_wiped) {
+               tdb_store_uint32(tdb,
+                                WINBINDD_CACHE_VERSION_KEYSTR,
+                                WINBINDD_CACHE_VERSION);
+       }
+
        return tdb;
 }