summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_cache.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-09-28 11:26:04 -0700
committerJeremy Allison <jra@samba.org>2016-09-29 22:17:20 +0200
commit1017b22f68e798a080e0738d3beecf008b2284ef (patch)
tree9420b281f93482e5c8c3f577448853289349a0f1 /source3/winbindd/winbindd_cache.c
parentf85b233a3e71447428aef312d8d369a37653f399 (diff)
downloadsamba-1017b22f68e798a080e0738d3beecf008b2284ef.tar.gz
s3: winbind: Trust name2sid mappings from the PAC.
Don't refresh sequence number in parent as the mapping comes from a trusted DC. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/winbindd/winbindd_cache.c')
-rw-r--r--source3/winbindd/winbindd_cache.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index 2bce12da9a7..3e01ff04022 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -3339,6 +3339,25 @@ bool lookup_cached_name(const char *domain_name,
return NT_STATUS_IS_OK(status);
}
+/*
+ * Cache a name to sid without checking the sequence number.
+ * Used when caching from a trusted PAC.
+ */
+
+void cache_name2sid_trusted(struct winbindd_domain *domain,
+ const char *domain_name,
+ const char *name,
+ enum lsa_SidType type,
+ const struct dom_sid *sid)
+{
+ wcache_save_name_to_sid(domain,
+ NT_STATUS_OK,
+ domain_name,
+ name,
+ sid,
+ type);
+}
+
void cache_name2sid(struct winbindd_domain *domain,
const char *domain_name, const char *name,
enum lsa_SidType type, const struct dom_sid *sid)