git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e59bf5e
)
s4-pydrs: validate the DsGetNCChanges response
author
Andrew Tridgell
<tridge@samba.org>
Sun, 7 Nov 2010 23:14:50 +0000
(10:14 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Mon, 8 Nov 2010 00:13:28 +0000
(11:13 +1100)
check that object_count matches up with first_object
source4/scripting/python/samba/drs_utils.py
patch
|
blob
|
history
diff --git
a/source4/scripting/python/samba/drs_utils.py
b/source4/scripting/python/samba/drs_utils.py
index 00efd78439f7ac78e0c1a187b323e4a5b2412655..5844b09074c0402b90e043a6b8ba5f3e3af202ec 100644
(file)
--- a/
source4/scripting/python/samba/drs_utils.py
+++ b/
source4/scripting/python/samba/drs_utils.py
@@
-167,6
+167,8
@@
class drs_Replicate:
while True:
(level, ctr) = self.drs.DsGetNCChanges(self.drs_handle, req_level, req)
+ if ctr.first_object == None and ctr.object_count != 0:
+ raise RuntimeError("DsGetNCChanges: NULL first_object with object_count=%u" % (ctr.object_count))
self.net.replicate_chunk(self.replication_state, level, ctr, schema=schema)
if ctr.more_data == 0:
break