diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-07-01 23:47:02 +0300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-07-02 10:08:12 +1000 |
commit | 5a66edc99ee782e36efa2fc64a7603247ba3abc1 (patch) | |
tree | 0c20973b94a88b1fcce06266252aecc69566f8f6 /source4/dsdb/samdb/ldb_modules | |
parent | 73474998e167837002da495993fa75de17e3aecd (diff) | |
download | samba-5a66edc99ee782e36efa2fc64a7603247ba3abc1.tar.gz samba-5a66edc99ee782e36efa2fc64a7603247ba3abc1.tar.bz2 samba-5a66edc99ee782e36efa2fc64a7603247ba3abc1.zip |
s4/dsdb: Assert DSDB_FLAG_*_MODULE is always passed in function call
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/util.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c index ba0c2d9166..ae08c0025f 100644 --- a/source4/dsdb/samdb/ldb_modules/util.c +++ b/source4/dsdb/samdb/ldb_modules/util.c @@ -159,6 +159,7 @@ int dsdb_module_search(struct ldb_module *module, } else if (dsdb_flags & DSDB_FLAG_TOP_MODULE) { ret = ldb_request(ldb_module_get_ctx(module), req); } else { + SMB_ASSERT(dsdb_flags & DSDB_FLAG_NEXT_MODULE); ret = ldb_next_request(module, req); } if (ret == LDB_SUCCESS) { @@ -287,6 +288,7 @@ int dsdb_module_modify(struct ldb_module *module, } else if (dsdb_flags & DSDB_FLAG_TOP_MODULE) { ret = ldb_request(ldb_module_get_ctx(module), mod_req); } else { + SMB_ASSERT(dsdb_flags & DSDB_FLAG_NEXT_MODULE); ret = ldb_next_request(module, mod_req); } if (ret == LDB_SUCCESS) { @@ -344,6 +346,7 @@ int dsdb_module_rename(struct ldb_module *module, } else if (dsdb_flags & DSDB_FLAG_TOP_MODULE) { ret = ldb_request(ldb_module_get_ctx(module), req); } else { + SMB_ASSERT(dsdb_flags & DSDB_FLAG_NEXT_MODULE); ret = ldb_next_request(module, req); } if (ret == LDB_SUCCESS) { @@ -398,6 +401,7 @@ int dsdb_module_add(struct ldb_module *module, } else if (dsdb_flags & DSDB_FLAG_TOP_MODULE) { ret = ldb_request(ldb_module_get_ctx(module), req); } else { + SMB_ASSERT(dsdb_flags & DSDB_FLAG_NEXT_MODULE); ret = ldb_next_request(module, req); } if (ret == LDB_SUCCESS) { @@ -452,6 +456,7 @@ int dsdb_module_del(struct ldb_module *module, } else if (dsdb_flags & DSDB_FLAG_TOP_MODULE) { ret = ldb_request(ldb_module_get_ctx(module), req); } else { + SMB_ASSERT(dsdb_flags & DSDB_FLAG_NEXT_MODULE); ret = ldb_next_request(module, req); } if (ret == LDB_SUCCESS) { |