summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-18 19:28:05 -0700
committerAndrew Tridgell <tridge@samba.org>2010-09-19 11:29:32 -0700
commit2666cc9c161d4a0f5083f546dbcf470d34b24499 (patch)
tree45cca13546b54ef2cc4b3a9d61e300adfc28c94a /source4
parent7a59c90189b3b129c4cf9826a45ac5678e66d95b (diff)
downloadsamba-2666cc9c161d4a0f5083f546dbcf470d34b24499.tar.gz
samba-2666cc9c161d4a0f5083f546dbcf470d34b24499.tar.bz2
samba-2666cc9c161d4a0f5083f546dbcf470d34b24499.zip
s4-pydsdb: don't force am_rodc unless it is set by caller
we should normally get the rodc flag by looking at the database, not by forcing it in the database connect
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/samdb.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py
index e2ac37a240..c43c65da93 100644
--- a/source4/scripting/python/samba/samdb.py
+++ b/source4/scripting/python/samba/samdb.py
@@ -40,7 +40,7 @@ class SamDB(samba.Ldb):
def __init__(self, url=None, lp=None, modules_dir=None, session_info=None,
credentials=None, flags=0, options=None, global_schema=True,
- auto_connect=True, am_rodc=False):
+ auto_connect=True, am_rodc=None):
self.lp = lp
if not auto_connect:
url = None
@@ -54,7 +54,8 @@ class SamDB(samba.Ldb):
if global_schema:
dsdb._dsdb_set_global_schema(self)
- dsdb._dsdb_set_am_rodc(self, am_rodc)
+ if am_rodc is not None:
+ dsdb._dsdb_set_am_rodc(self, am_rodc)
def connect(self, url=None, flags=0, options=None):
if self.lp is not None: