]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbindd: Use TDB_REPLACE in tdb_store
authorPavel Filipenský <pfilipensky@samba.org>
Tue, 7 May 2024 11:01:02 +0000 (13:01 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 14 May 2024 20:02:36 +0000 (20:02 +0000)
tdb_store() should use as a flag TDB_REPLACE instead of undocumented 0

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd_cache.c

index ca2341ef4564ede9935f0643259ec880bd7aa70e..0067f8bd2445fef152337c35420ed1eef51fd378 100644 (file)
@@ -4605,7 +4605,7 @@ static bool wcache_tdc_store_list( struct winbindd_tdc_domain *domains, size_t n
                goto done;
        }
 
-       ret = tdb_store( wcache->tdb, key, data, 0 );
+       ret = tdb_store(wcache->tdb, key, data, TDB_REPLACE);
 
  done:
        SAFE_FREE( data.dptr );
@@ -4922,7 +4922,7 @@ void wcache_store_ndr(struct winbindd_domain *domain, uint32_t opnum,
        SBVAL(data.dptr, 4, timeout);
        memcpy(data.dptr + 12, resp->data, resp->length);
 
-       tdb_store(wcache->tdb, key, data, 0);
+       tdb_store(wcache->tdb, key, data, TDB_REPLACE);
 
 done:
        TALLOC_FREE(key.dptr);