1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

samba_kcc: Fix existing syntax errors preventing samba_kcc from running

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Garming Sam 2015-01-23 09:43:55 +13:00 committed by Andrew Bartlett
parent 204fe65be2
commit d486e4ce6f
2 changed files with 8 additions and 8 deletions

View File

@ -73,7 +73,7 @@ class NamingContext(object):
scope=ldb.SCOPE_BASE, attrs=attrs) scope=ldb.SCOPE_BASE, attrs=attrs)
except ldb.LdbError, (enum, estr): except ldb.LdbError, (enum, estr):
raise Exception("Unable to find naming context (%s)" % raise Exception("Unable to find naming context (%s) - (%s)" %
(self.nc_dnstr, estr)) (self.nc_dnstr, estr))
msg = res[0] msg = res[0]
if "objectGUID" in msg: if "objectGUID" in msg:
@ -375,7 +375,7 @@ class NCReplica(NamingContext):
except ldb.LdbError, estr: except ldb.LdbError, estr:
raise Exception("Could not set repsFrom for (%s) - (%s)" % raise Exception("Could not set repsFrom for (%s) - (%s)" %
(self.dsa_dnstr, estr)) (self.nc_dnstr, estr))
def dumpstr_to_be_deleted(self): def dumpstr_to_be_deleted(self):
text="" text=""
@ -906,7 +906,7 @@ class NTDSConnection(object):
self.load_connection_transport(samdb, str(dsdn.dn)) self.load_connection_transport(samdb, str(dsdn.dn))
if "schedule" in msg: if "schedule" in msg:
self.schedule = ndr_unpack(drsblobs.replSchedule, msg["schedule"][0]) self.schedule = ndr_unpack(drsblobs.schedule, msg["schedule"][0])
if "whenCreated" in msg: if "whenCreated" in msg:
self.whenCreated = ldb.string_to_time(msg["whenCreated"][0]) self.whenCreated = ldb.string_to_time(msg["whenCreated"][0])
@ -928,7 +928,7 @@ class NTDSConnection(object):
scope=ldb.SCOPE_BASE, attrs=attrs) scope=ldb.SCOPE_BASE, attrs=attrs)
except ldb.LdbError, (enum, estr): except ldb.LdbError, (enum, estr):
raise Exception("Unable to find transport (%s)" % raise Exception("Unable to find transport (%s) - (%s)" %
(tdnstr, estr)) (tdnstr, estr))
if "objectGUID" in res[0]: if "objectGUID" in res[0]:
@ -1783,7 +1783,7 @@ class GraphNode(object):
flags = dsdb.SYSTEM_FLAG_CONFIG_ALLOW_RENAME + \ flags = dsdb.SYSTEM_FLAG_CONFIG_ALLOW_RENAME + \
dsdb.SYSTEM_FLAG_CONFIG_ALLOW_MOVE dsdb.SYSTEM_FLAG_CONFIG_ALLOW_MOVE
dsa.create_connection(opt, flags, None, edge_dnstr, None) dsa.new_connection(opt, flags, None, edge_dnstr, None)
def has_sufficient_edges(self): def has_sufficient_edges(self):
'''Return True if we have met the maximum "from edges" criteria''' '''Return True if we have met the maximum "from edges" criteria'''

View File

@ -654,7 +654,7 @@ class KCC(object):
res = self.samdb.search(base=pdnstr, scope=ldb.SCOPE_BASE, res = self.samdb.search(base=pdnstr, scope=ldb.SCOPE_BASE,
attrs=attrs) attrs=attrs)
except ldb.ldbError, (enum, estr): except ldb.LdbError, (enum, estr):
raise Exception( raise Exception(
"Unable to find attr (%s) for (%s) - (%s)" % "Unable to find attr (%s) for (%s) - (%s)" %
(x_transport.address_attr, pdnstr, estr)) (x_transport.address_attr, pdnstr, estr))
@ -1027,7 +1027,7 @@ class KCC(object):
res = self.samdb.search(base=pdnstr, scope=ldb.SCOPE_BASE, res = self.samdb.search(base=pdnstr, scope=ldb.SCOPE_BASE,
attrs=attrs) attrs=attrs)
except ldb.ldbError, (enum, estr): except ldb.LdbError, (enum, estr):
continue continue
msg = res[0] msg = res[0]
@ -1272,7 +1272,7 @@ class KCC(object):
# NTDSCONN_OPT_USE_NOTIFY in opt # NTDSCONN_OPT_USE_NOTIFY in opt
if (link_opt & dsdb.NTDSSITELINK_OPT_USE_NOTIFY) != 0: if (link_opt & dsdb.NTDSSITELINK_OPT_USE_NOTIFY) != 0:
opt |= (dsdb.NTDSCONN_OPT_OVERRIDE_NOTIFY_DEFAULT | opt |= (dsdb.NTDSCONN_OPT_OVERRIDE_NOTIFY_DEFAULT |
dsdb.NTDSCONN_USE_NOTIFY) dsdb.NTDSCONN_OPT_USE_NOTIFY)
# IF bit NTDSSITELINK_OPT_TWOWAY_SYNC is set in ri.Options # IF bit NTDSSITELINK_OPT_TWOWAY_SYNC is set in ri.Options
# SET bit NTDSCONN_OPT_TWOWAY_SYNC opt # SET bit NTDSCONN_OPT_TWOWAY_SYNC opt