From 37ef59d4c323a068b978b6beecef367f736b4a86 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 8 Feb 2004 12:04:23 +0000 Subject: (merge from 3.0) When we set a domain sid, force get_global_sam_sid() to do it's work again. This should ensure that the value it returns is always consistant. Andrew Bartlett (This used to be commit fb13c61d4eee943e44632a0d1ba57b19602d67a4) --- source3/passdb/secrets.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/passdb/secrets.c') diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 7317a4cf06..7531435e84 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -99,10 +99,16 @@ BOOL secrets_delete(const char *key) BOOL secrets_store_domain_sid(const char *domain, const DOM_SID *sid) { fstring key; + BOOL ret; slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_SID, domain); strupper_m(key); - return secrets_store(key, sid, sizeof(DOM_SID)); + ret = secrets_store(key, sid, sizeof(DOM_SID)); + + /* Force a re-query, in case we modified our domain */ + if (ret) + reset_global_sam_sid(); + return ret; } BOOL secrets_fetch_domain_sid(const char *domain, DOM_SID *sid) -- cgit