git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d7c536b
)
s4:ldap_server: rename helper functions to ldapsrv_ prefix and pass ldapsrv_call
author
Stefan Metzmacher
<metze@samba.org>
Wed, 1 Dec 2010 11:14:22 +0000
(12:14 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Mon, 13 Dec 2010 14:32:04 +0000
(15:32 +0100)
metze
source4/ldap_server/ldap_backend.c
patch
|
blob
|
history
diff --git
a/source4/ldap_server/ldap_backend.c
b/source4/ldap_server/ldap_backend.c
index e45c180e317bb0bb8fbb76f583149ca3531aec17..01d0376b8263c8c8da3aaa2101b554ad38e1675d 100644
(file)
--- a/
source4/ldap_server/ldap_backend.c
+++ b/
source4/ldap_server/ldap_backend.c
@@
-293,11
+293,12
@@
static NTSTATUS ldapsrv_unwilling(struct ldapsrv_call *call, int error)
return NT_STATUS_OK;
}
return NT_STATUS_OK;
}
-static int ld
b_add_with_controls(struct ldb_context *ldb
,
- const struct ldb_message *message,
- struct ldb_control **controls,
- void *context)
+static int ld
apsrv_add_with_controls(struct ldapsrv_call *call
,
+
const struct ldb_message *message,
+
struct ldb_control **controls,
+
void *context)
{
{
+ struct ldb_context *ldb = call->conn->ldb;
struct ldb_request *req;
int ret;
struct ldb_request *req;
int ret;
@@
-341,11
+342,12
@@
static int ldb_add_with_controls(struct ldb_context *ldb,
}
/* create and execute a modify request */
}
/* create and execute a modify request */
-static int ld
b_mod_req_with_controls(struct ldb_context *ldb
,
+static int ld
apsrv_mod_with_controls(struct ldapsrv_call *call
,
const struct ldb_message *message,
struct ldb_control **controls,
void *context)
{
const struct ldb_message *message,
struct ldb_control **controls,
void *context)
{
+ struct ldb_context *ldb = call->conn->ldb;
struct ldb_request *req;
int ret;
struct ldb_request *req;
int ret;
@@
-391,11
+393,12
@@
static int ldb_mod_req_with_controls(struct ldb_context *ldb,
}
/* create and execute a delete request */
}
/* create and execute a delete request */
-static int ld
b_del_req_with_controls(struct ldb_context *ldb
,
+static int ld
apsrv_del_with_controls(struct ldapsrv_call *call
,
struct ldb_dn *dn,
struct ldb_control **controls,
void *context)
{
struct ldb_dn *dn,
struct ldb_control **controls,
void *context)
{
+ struct ldb_context *ldb = call->conn->ldb;
struct ldb_request *req;
int ret;
struct ldb_request *req;
int ret;
@@
-433,12
+436,13
@@
static int ldb_del_req_with_controls(struct ldb_context *ldb,
return ret;
}
return ret;
}
-
int ldb_rename_with_controls(struct ldb_context *ldb
,
- struct ldb_dn *olddn,
- struct ldb_dn *newdn,
- struct ldb_control **controls,
- void *context)
+
static int ldapsrv_rename_with_controls(struct ldapsrv_call *call
,
+
struct ldb_dn *olddn,
+
struct ldb_dn *newdn,
+
struct ldb_control **controls,
+
void *context)
{
{
+ struct ldb_context *ldb = call->conn->ldb;
struct ldb_request *req;
int ret;
struct ldb_request *req;
int ret;
@@
-782,7
+786,7
@@
reply:
if (result == LDAP_SUCCESS) {
res = talloc_zero(local_ctx, struct ldb_result);
NT_STATUS_HAVE_NO_MEMORY(res);
if (result == LDAP_SUCCESS) {
res = talloc_zero(local_ctx, struct ldb_result);
NT_STATUS_HAVE_NO_MEMORY(res);
- ldb_ret = ld
b_mod_req_with_controls(samdb
, msg, call->request->controls, res);
+ ldb_ret = ld
apsrv_mod_with_controls(call
, msg, call->request->controls, res);
result = map_ldb_error(local_ctx, ldb_ret, ldb_errstring(samdb),
&errstr);
}
result = map_ldb_error(local_ctx, ldb_ret, ldb_errstring(samdb),
&errstr);
}
@@
-872,7
+876,7
@@
reply:
if (result == LDAP_SUCCESS) {
res = talloc_zero(local_ctx, struct ldb_result);
NT_STATUS_HAVE_NO_MEMORY(res);
if (result == LDAP_SUCCESS) {
res = talloc_zero(local_ctx, struct ldb_result);
NT_STATUS_HAVE_NO_MEMORY(res);
- ldb_ret = ld
b_add_with_controls(samdb
, msg, call->request->controls, res);
+ ldb_ret = ld
apsrv_add_with_controls(call
, msg, call->request->controls, res);
result = map_ldb_error(local_ctx, ldb_ret, ldb_errstring(samdb),
&errstr);
}
result = map_ldb_error(local_ctx, ldb_ret, ldb_errstring(samdb),
&errstr);
}
@@
-928,7
+932,7
@@
reply:
if (result == LDAP_SUCCESS) {
res = talloc_zero(local_ctx, struct ldb_result);
NT_STATUS_HAVE_NO_MEMORY(res);
if (result == LDAP_SUCCESS) {
res = talloc_zero(local_ctx, struct ldb_result);
NT_STATUS_HAVE_NO_MEMORY(res);
- ldb_ret = ld
b_del_req_with_controls(samdb
, dn, call->request->controls, res);
+ ldb_ret = ld
apsrv_del_with_controls(call
, dn, call->request->controls, res);
result = map_ldb_error(local_ctx, ldb_ret, ldb_errstring(samdb),
&errstr);
}
result = map_ldb_error(local_ctx, ldb_ret, ldb_errstring(samdb),
&errstr);
}
@@
-1036,7
+1040,7
@@
reply:
if (result == LDAP_SUCCESS) {
res = talloc_zero(local_ctx, struct ldb_result);
NT_STATUS_HAVE_NO_MEMORY(res);
if (result == LDAP_SUCCESS) {
res = talloc_zero(local_ctx, struct ldb_result);
NT_STATUS_HAVE_NO_MEMORY(res);
- ldb_ret = ld
b_rename_with_controls(samdb
, olddn, newdn, call->request->controls, res);
+ ldb_ret = ld
apsrv_rename_with_controls(call
, olddn, newdn, call->request->controls, res);
result = map_ldb_error(local_ctx, ldb_ret, ldb_errstring(samdb),
&errstr);
}
result = map_ldb_error(local_ctx, ldb_ret, ldb_errstring(samdb),
&errstr);
}