s4-dsdb: use ldb_operr() in the dsdb code
[metze/samba/wip.git] / source4 / dsdb / samdb / ldb_modules / proxy.c
index 616563e2d0e9792124245910a693626c3d2ecc09..109afd22fe32bb73d4a0d9984c897cf9dc8c3117 100644 (file)
@@ -155,7 +155,7 @@ failed:
        talloc_free(proxy->newdn);
        talloc_free(proxy->upstream);
        proxy->upstream = NULL;
-       return LDB_ERR_OPERATIONS_ERROR;
+       return ldb_operr(ldb);
 }
 
 
@@ -319,7 +319,7 @@ static int proxy_search_bytree(struct ldb_module *module, struct ldb_request *re
        }
 
        if (load_proxy_info(module) != LDB_SUCCESS) {
-               return LDB_ERR_OPERATIONS_ERROR;
+               return ldb_operr(ldb);
        }
 
        /* see if the dn is within olddn */
@@ -329,7 +329,7 @@ static int proxy_search_bytree(struct ldb_module *module, struct ldb_request *re
 
        ac = talloc(req, struct proxy_ctx);
        if (ac == NULL) {
-               return LDB_ERR_OPERATIONS_ERROR;
+               return ldb_oom(ldb);
        }
 
        ac->module = module;