summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-07-03 15:49:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:45 -0500
commita3f606f6cab58e7e15f8a4f6a05a7437dc0569c8 (patch)
treef83c19770920ef5b9323fb6962ee72741e1ccbb0
parentaf04a37ce79cfa7ba912f30fd28965cd568eb4e4 (diff)
downloadsamba-a3f606f6cab58e7e15f8a4f6a05a7437dc0569c8.tar.gz
samba-a3f606f6cab58e7e15f8a4f6a05a7437dc0569c8.tar.bz2
samba-a3f606f6cab58e7e15f8a4f6a05a7437dc0569c8.zip
r16784: - make some function in ldb static, they not need to be exported anywhere
- fix a bad segfault Andrew please make test before committing. Simo. (This used to be commit b9b6bb3e89d3b0e04ccce15156c1a128b6f20d88)
-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)