summaryrefslogtreecommitdiff
path: root/source4/scripting/python/samba/__init__.py
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-08-24 15:32:57 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-26 14:06:07 +0200
commit607d7c5cdfc6575ac24df7c8996c11c9679abb44 (patch)
tree43ce8df0e7e72c633f6df1b2729c4a5d13b14bd2 /source4/scripting/python/samba/__init__.py
parent322b5253f44f301362cb428175b0f22f358d4931 (diff)
downloadsamba-607d7c5cdfc6575ac24df7c8996c11c9679abb44.tar.gz
samba-607d7c5cdfc6575ac24df7c8996c11c9679abb44.tar.bz2
samba-607d7c5cdfc6575ac24df7c8996c11c9679abb44.zip
s4-provision Use samba.dns_name_to_dn
Diffstat (limited to 'source4/scripting/python/samba/__init__.py')
-rw-r--r--source4/scripting/python/samba/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py
index 76eb44ce928..03ee6faa59f 100644
--- a/source4/scripting/python/samba/__init__.py
+++ b/source4/scripting/python/samba/__init__.py
@@ -339,6 +339,10 @@ def ensure_external_module(modulename, location):
import_bundled_package(modulename, location)
+def dn_from_dns_name(dnsdomain):
+ """return a DN from a DNS name domain/forest root"""
+ return "DC=" + ",DC=".join(dnsdomain.split("."))
+
from samba import _glue
version = _glue.version
interface_ips = _glue.interface_ips