summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/sids.c14
-rw-r--r--source3/lib/util.c1
2 files changed, 15 insertions, 0 deletions
diff --git a/source3/lib/sids.c b/source3/lib/sids.c
index e46d3782cb..0f9b32f49d 100644
--- a/source3/lib/sids.c
+++ b/source3/lib/sids.c
@@ -434,6 +434,20 @@ BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain)
return False;
}
+/**************************************************************************
+ turns a domain SID into a domain controller name.
+***************************************************************************/
+BOOL map_domain_sid_to_any_dc(DOM_SID *sid, char *dc_name)
+{
+ fstring domain;
+
+ if (!map_domain_sid_to_name(sid, domain))
+ {
+ return False;
+ }
+
+ return get_any_dc_name(domain, dc_name);
+}
/**************************************************************************
splits a name of format \DOMAIN\name or name into its two components.
diff --git a/source3/lib/util.c b/source3/lib/util.c
index b0d6e82970..9a9f87d473 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -3262,3 +3262,4 @@ char *get_trusted_serverlist(const char* domain)
return NULL;
}
+