summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c8
-rw-r--r--source4/lib/ldb/common/ldb.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index a4816f13db..9d7c78487a 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -617,6 +617,10 @@ static int password_hash_add(struct ldb_module *module, struct ldb_request *req)
return LDB_ERR_CONSTRAINT_VIOLATION;
}
+ h = ph_init_handle(req, module, PH_ADD);
+ if (!h) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
ac = talloc_get_type(h->private_data, struct ph_async_context);
/* get user domain data */
@@ -626,10 +630,6 @@ static int password_hash_add(struct ldb_module *module, struct ldb_request *req)
return LDB_ERR_OPERATIONS_ERROR;
}
- h = ph_init_handle(req, module, PH_ADD);
- if (!h) {
- return LDB_ERR_OPERATIONS_ERROR;
- }
ret = build_domain_data_request(ac);
if (ret != LDB_SUCCESS) {
return ret;
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index 1022f422c0..5228eeb6b3 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -294,7 +294,7 @@ int ldb_transaction_cancel(struct ldb_context *ldb)
return ldb_transaction_cancel_internal(ldb);
}
-int ldb_autotransaction_start(struct ldb_context *ldb)
+static int ldb_autotransaction_start(struct ldb_context *ldb)
{
/* explicit transaction active, ignore autotransaction request */
if (ldb->transaction_active)
@@ -303,7 +303,7 @@ int ldb_autotransaction_start(struct ldb_context *ldb)
return ldb_transaction_start_internal(ldb);
}
-int ldb_autotransaction_commit(struct ldb_context *ldb)
+static int ldb_autotransaction_commit(struct ldb_context *ldb)
{
/* explicit transaction active, ignore autotransaction request */
if (ldb->transaction_active)
@@ -312,7 +312,7 @@ int ldb_autotransaction_commit(struct ldb_context *ldb)
return ldb_transaction_commit_internal(ldb);
}
-int ldb_autotransaction_cancel(struct ldb_context *ldb)
+static int ldb_autotransaction_cancel(struct ldb_context *ldb)
{
/* explicit transaction active, ignore autotransaction request */
if (ldb->transaction_active)