From 6ee7161e0f9af444d7ad15a7a0a3cf750e2a655e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 13 Oct 2016 15:01:58 -0700 Subject: [PATCH] s3: winbind: Ensure we store name2sid with the correct cache sequence number. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11259 Signed-off-by: Jeremy Allison --- source3/winbindd/winbindd_cache.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index c52e9ed..4a9782a 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -3355,6 +3355,12 @@ void cache_name2sid_trusted(struct winbindd_domain *domain, enum lsa_SidType type, const struct dom_sid *sid) { + /* + * Ensure we store the mapping with the + * existing sequence number from the cache. + */ + get_cache(domain); + (void)fetch_cache_seqnum(domain, time(NULL)); wcache_save_name_to_sid(domain, NT_STATUS_OK, domain_name, -- 2.8.0.rc3.226.g39d4020