From c4606bc40632869ff4f1036cf6899df400d15a53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Thu, 17 Jul 2025 16:49:03 +0200 Subject: [PATCH] s3-winbindd: Fix winbind NDR caching. All of winbindd's core caching relies on NDR entries. Those entries can not be stored in winbindd_cache.tdb via wcache_store_ndr() as long as there is no SEQNUM entry present in the cache. Guenther BUG: https://bugzilla.samba.org/show_bug.cgi?id=15963 Signed-off-by: Guenther Deschner Reviewed-by: Andreas Schneider --- selftest/knownfail | 2 -- source3/winbindd/winbindd_cache.c | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/selftest/knownfail b/selftest/knownfail index e077fbc8553..19955ec8ca3 100644 --- a/selftest/knownfail +++ b/selftest/knownfail @@ -341,5 +341,3 @@ # Currently winbindd_cache.tdb is not working as expected ^samba3.winbind_cache_sanity.WINBINDD_CACHE_VERSION.* -^samba3.winbind_cache_sanity.SEQNUM.* -^samba3.winbind_cache_sanity.NDR.* diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index eb79586a2ca..1fb1a2f24ca 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -3196,6 +3196,13 @@ static bool init_wcache(void) return false; } + /* + * Create a dummy SEQNUM entry early, otherwise every call via the + * winbind NDR interface will fail to call wcache_store_ndr() when there + * is no SEQNUM present already + */ + wcache_store_seqnum(lp_workgroup(), 0, 0); + return true; } -- 2.47.3