diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-08-27 17:25:56 +0300 |
---|---|---|
committer | Kamen Mazdrashki <kamenim@samba.org> | 2010-08-28 23:38:58 +0300 |
commit | a052497c7427ba7212fbc6a5d0053990dcf0c0dc (patch) | |
tree | 5d691f584559671ca2f4708f309fa257a6b2aacd /source4/dsdb | |
parent | d1d2997b0efaadb9017b7bfe97c280fe9520e6dd (diff) | |
download | samba-a052497c7427ba7212fbc6a5d0053990dcf0c0dc.tar.gz samba-a052497c7427ba7212fbc6a5d0053990dcf0c0dc.tar.bz2 samba-a052497c7427ba7212fbc6a5d0053990dcf0c0dc.zip |
s4-kcc: Assert when unexpected repsFromToBlob version is passed
At present we only support v1 structures (Win2k3 and earlier),
so it is good to make it obvious.
In case we start supporting v2 we will be able to notice this
function should be refactored right away
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/kcc/kcc_periodic.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c index 3f37208dec..4deb9124eb 100644 --- a/source4/dsdb/kcc/kcc_periodic.c +++ b/source4/dsdb/kcc/kcc_periodic.c @@ -59,11 +59,13 @@ static bool reps_in_list(struct repsFromToBlob *r, struct repsFromToBlob *reps, static bool check_MasterNC(struct kccsrv_partition *p, struct repsFromToBlob *r, struct ldb_result *res) { - struct repsFromTo1 *r1; - r1 = &r->ctr.ctr1; + struct repsFromTo1 *r1 = &r->ctr.ctr1; struct GUID invocation_id = r1->source_dsa_invocation_id; unsigned int i, j; + /* we are expecting only version 1 */ + SMB_ASSERT(r->version == 1); + for (i=0; i<res->count; i++) { struct ldb_message *msg = res->msgs[i]; struct ldb_message_element *el; |