summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-10-14 09:25:56 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-10-27 18:52:29 +0200
commit3fe747538bc79633ed7039c6c001902bacecef04 (patch)
tree8885519620a05eaa7588c66601e560479953e87e /source4/dsdb
parentd95b4c94978fad40b6cb052522aa191fe77c6663 (diff)
downloadsamba-3fe747538bc79633ed7039c6c001902bacecef04.tar.gz
samba-3fe747538bc79633ed7039c6c001902bacecef04.tar.bz2
samba-3fe747538bc79633ed7039c6c001902bacecef04.zip
s4:repl_meta_data LDB module - "dsdb_search_module_dn" already checks if len(res) == 1
No need to perform an additional check here. As a return value we should always give back the original error code and not generate a new one (to let the caller know what is going on). Reviewed-by: abartlet
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index b3126c3e88..090e28fdf5 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -1243,10 +1243,10 @@ static int replmd_update_rpmd(struct ldb_module *module,
DSDB_SEARCH_SHOW_DN_IN_STORAGE_FORMAT |
DSDB_SEARCH_REVEAL_INTERNALS, req);
- if (ret != LDB_SUCCESS || res->count != 1) {
+ if (ret != LDB_SUCCESS) {
DEBUG(0,(__location__ ": Object %s failed to find uSNChanged\n",
ldb_dn_get_linearized(msg->dn)));
- return LDB_ERR_OPERATIONS_ERROR;
+ return ret;
}
objectclass_el = ldb_msg_find_element(res->msgs[0], "objectClass");
@@ -1275,10 +1275,10 @@ static int replmd_update_rpmd(struct ldb_module *module,
DSDB_SEARCH_SHOW_EXTENDED_DN |
DSDB_SEARCH_SHOW_DN_IN_STORAGE_FORMAT |
DSDB_SEARCH_REVEAL_INTERNALS, req);
- if (ret != LDB_SUCCESS || res->count != 1) {
+ if (ret != LDB_SUCCESS) {
DEBUG(0,(__location__ ": Object %s failed to find replPropertyMetaData\n",
ldb_dn_get_linearized(msg->dn)));
- return LDB_ERR_OPERATIONS_ERROR;
+ return ret;
}
objectclass_el = ldb_msg_find_element(res->msgs[0], "objectClass");