From 1e288f558820e232e7e9fcb16bb43e894cb9ee3c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 13 Oct 2016 15:01:58 -0700 Subject: 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 Reviewed-by: Uri Simchoni (cherry picked from commit 9f6fe5e2c54870abfff48c8a9d96e21bfec2425f) --- source3/winbindd/winbindd_cache.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3') diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index cd1b5784c4a..e5410a8bdc6 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -3341,6 +3341,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, -- cgit v1.2.1