diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-09-18 19:28:05 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-09-19 11:29:32 -0700 |
commit | 2666cc9c161d4a0f5083f546dbcf470d34b24499 (patch) | |
tree | 45cca13546b54ef2cc4b3a9d61e300adfc28c94a | |
parent | 7a59c90189b3b129c4cf9826a45ac5678e66d95b (diff) | |
download | samba-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
-rw-r--r-- | source4/scripting/python/samba/samdb.py | 5 |
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: |