summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-03-31 11:58:37 +1100
committerAndrew Tridgell <tridge@samba.org>2009-03-31 11:58:37 +1100
commit631e688c821b78d09d77f5940074800525c554aa (patch)
tree74473f1727ea0afa27d9c15e50e4638c4d8faf28 /source4/scripting/python
parent13be4d7ff42bd2b8bf5702a499c482404e5cd164 (diff)
parent4b8e4ea7286f045effb6feb4c7bf8c5ef4ed2f9b (diff)
downloadsamba-631e688c821b78d09d77f5940074800525c554aa.tar.gz
samba-631e688c821b78d09d77f5940074800525c554aa.tar.bz2
samba-631e688c821b78d09d77f5940074800525c554aa.zip
Merge branch 'master' into wspp-schema
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/__init__.py6
-rw-r--r--source4/scripting/python/samba/provision.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py
index a49e6e1ead..c5827b96e0 100644
--- a/source4/scripting/python/samba/__init__.py
+++ b/source4/scripting/python/samba/__init__.py
@@ -54,7 +54,7 @@ class Ldb(ldb.Ldb):
functions see samdb.py.
"""
def __init__(self, url=None, session_info=None, credentials=None,
- modules_dir=None, lp=None):
+ modules_dir=None, lp=None, options=None):
"""Open a Samba Ldb file.
:param url: Optional LDB URL to open
@@ -67,7 +67,7 @@ class Ldb(ldb.Ldb):
modules-dir is used by default and that credentials and session_info
can be passed through (required by some modules).
"""
- super(Ldb, self).__init__()
+ super(Ldb, self).__init__(options=options)
if modules_dir is not None:
self.set_modules_dir(modules_dir)
@@ -90,7 +90,7 @@ class Ldb(ldb.Ldb):
#self.set_debug(msg)
if url is not None:
- self.connect(url)
+ self.connect(url, options=options)
def set_credentials(self, credentials):
glue.ldb_set_credentials(self, credentials)
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 1e34b11d0a..64908ccb4d 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -1051,7 +1051,7 @@ def provision(setup_dir, message, session_info,
serverrole=serverrole, ldap_backend=ldap_backend,
ldap_backend_type=ldap_backend_type)
- if lp.get("server role") == "domain controller":
+ if serverrole == "domain controller":
if paths.netlogon is None:
message("Existing smb.conf does not have a [netlogon] share, but you are configuring a DC.")
message("Please either remove %s or see the template at %s" %