summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/local_password.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/local_password.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/local_password.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/local_password.c b/source4/dsdb/samdb/ldb_modules/local_password.c
index 4f9cfd63d4..942b5a2543 100644
--- a/source4/dsdb/samdb/ldb_modules/local_password.c
+++ b/source4/dsdb/samdb/ldb_modules/local_password.c
@@ -187,12 +187,12 @@ static int local_password_add(struct ldb_module *module, struct ldb_request *req
/* From here, we assume we have password attributes to split off */
ac = lpdb_init_context(module, req);
if (!ac) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
remote_message = ldb_msg_copy_shallow(remote_req, req->op.add.message);
if (remote_message == NULL) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
/* Remove any password attributes from the remote message */
@@ -205,7 +205,7 @@ static int local_password_add(struct ldb_module *module, struct ldb_request *req
ac->local_message = ldb_msg_copy_shallow(ac, req->op.add.message);
if (ac->local_message == NULL) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
/* Remove anything seen in the remote message from the local
@@ -232,7 +232,7 @@ static int local_password_add(struct ldb_module *module, struct ldb_request *req
PASSWORD_GUID_ATTR "=%s",
GUID_string(ac->local_message,
&objectGUID)))) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
ret = ldb_build_add_req(&remote_req, ldb, ac,
@@ -339,12 +339,12 @@ static int local_password_modify(struct ldb_module *module, struct ldb_request *
/* From here, we assume we have password attributes to split off */
ac = lpdb_init_context(module, req);
if (!ac) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
remote_message = ldb_msg_copy_shallow(ac, ac->req->op.mod.message);
if (remote_message == NULL) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
/* Remove any password attributes from the remote message */
@@ -354,7 +354,7 @@ static int local_password_modify(struct ldb_module *module, struct ldb_request *
ac->local_message = ldb_msg_copy_shallow(ac, ac->req->op.mod.message);
if (ac->local_message == NULL) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
/* Remove anything seen in the remote message from the local
@@ -571,7 +571,7 @@ static int local_password_delete(struct ldb_module *module,
/* From here, we assume we have password attributes to split off */
ac = lpdb_init_context(module, req);
if (!ac) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
ret = ldb_build_del_req(&remote_req, ldb, ac,
@@ -769,7 +769,7 @@ static int lpdb_local_search(struct lpdb_context *ac)
ac, lpdb_local_search_callback,
ac->req);
if (ret != LDB_SUCCESS) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
return ldb_next_request(ac->module, local_req);
@@ -1046,7 +1046,7 @@ static int local_password_search(struct ldb_module *module, struct ldb_request *
ac = lpdb_init_context(module, req);
if (!ac) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
/* Remote search is for all attributes: if the remote LDAP server has these attributes, then it overrides the local database */
@@ -1055,7 +1055,7 @@ static int local_password_search(struct ldb_module *module, struct ldb_request *
search_attrs = ldb_attr_list_copy_add(ac, req->op.search.attrs, "objectGUID");
ac->added_objectGUID = true;
if (!search_attrs) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
} else {
search_attrs = req->op.search.attrs;
@@ -1064,7 +1064,7 @@ static int local_password_search(struct ldb_module *module, struct ldb_request *
search_attrs = ldb_attr_list_copy_add(ac, search_attrs, "objectClass");
ac->added_objectClass = true;
if (!search_attrs) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
}
} else {