diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-11-08 10:14:50 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-11-08 11:13:28 +1100 |
commit | cc5e23135560f1f298a58ef59ee87f1c195d1854 (patch) | |
tree | 58ac62098c8bc39dfcf648b3dd5f939c1306f163 | |
parent | e59bf5efb5cf23ff21f2a2ac7dff8d211070a916 (diff) | |
download | samba-cc5e23135560f1f298a58ef59ee87f1c195d1854.tar.gz samba-cc5e23135560f1f298a58ef59ee87f1c195d1854.tar.bz2 samba-cc5e23135560f1f298a58ef59ee87f1c195d1854.zip |
s4-pydrs: validate the DsGetNCChanges response
check that object_count matches up with first_object
-rw-r--r-- | source4/scripting/python/samba/drs_utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/drs_utils.py b/source4/scripting/python/samba/drs_utils.py index 00efd78439..5844b09074 100644 --- 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 |