const char *dn,
const char *mechanism,
DATA_BLOB *creds,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls);
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls);
int tldap_sasl_bind_recv(struct tevent_req *req);
int tldap_sasl_bind(struct tldap_context *ldap,
const char *dn,
const char *mechanism,
DATA_BLOB *creds,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls);
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_ctrls);
struct tevent_req *tldap_simple_bind_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
const char **attrs,
int num_attrs,
int attrsonly,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls,
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls,
int timelimit,
int sizelimit,
int deref);
int tldap_search(struct tldap_context *ld,
const char *base, int scope, const char *filter,
const char **attrs, int num_attrs, int attrsonly,
- struct tldap_control **sctrls, struct tldap_control **cctrls,
+ struct tldap_control *sctrls, int num_sctrls,
+ struct tldap_control *cctrls, int num_cctrls,
int timelimit, int sizelimit, int deref,
TALLOC_CTX *mem_ctx, struct tldap_message ***pentries,
struct tldap_message ***refs);
struct tevent_context *ev,
struct tldap_context *ld,
const char *dn,
- int num_attributes,
struct tldap_mod *attributes,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls);
+ int num_attributes,
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls);
int tldap_add_recv(struct tevent_req *req);
int tldap_add(struct tldap_context *ld, const char *dn,
int num_attributes, struct tldap_mod *attributes,
- struct tldap_control **sctrls, struct tldap_control **cctrls);
+ struct tldap_control *sctrls, int num_sctrls,
+ struct tldap_control *cctrls, int num_cctrls);
struct tevent_req *tldap_modify_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct tldap_context *ld,
const char *dn,
int num_mods, struct tldap_mod *mods,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls);
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls);
int tldap_modify_recv(struct tevent_req *req);
int tldap_modify(struct tldap_context *ld, const char *dn,
int num_mods, struct tldap_mod *mods,
- struct tldap_control **sctrls, struct tldap_control **cctrls);
-
+ struct tldap_control *sctrls, int num_sctrls,
+ struct tldap_control *cctrls, int num_cctrls);
struct tevent_req *tldap_delete_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct tldap_context *ld,
const char *dn,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls);
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls);
int tldap_delete_recv(struct tevent_req *req);
int tldap_delete(struct tldap_context *ld, const char *dn,
- struct tldap_control **sctrls, struct tldap_control **cctrls);
-
+ struct tldap_control *sctrls, int num_sctrls,
+ struct tldap_control *cctrls, int num_cctrls);
int tldap_msg_id(const struct tldap_message *msg);
int tldap_msg_type(const struct tldap_message *msg);
const char *dn,
const char *mechanism,
DATA_BLOB *creds,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls)
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls)
{
struct tevent_req *req, *subreq;
struct tldap_req_state *state;
const char *dn,
const char *mechanism,
DATA_BLOB *creds,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls)
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls)
{
TALLOC_CTX *frame = talloc_stackframe();
struct tevent_context *ev;
}
req = tldap_sasl_bind_send(frame, ev, ld, dn, mechanism, creds,
- sctrls, cctrls);
+ sctrls, num_sctrls, cctrls, num_cctrls);
if (req == NULL) {
result = TLDAP_NO_MEMORY;
goto fail;
cred.data = (uint8_t *)"";
cred.length = 0;
}
- return tldap_sasl_bind_send(mem_ctx, ev, ld, dn, NULL, &cred, NULL,
- NULL);
+ return tldap_sasl_bind_send(mem_ctx, ev, ld, dn, NULL, &cred, NULL, 0,
+ NULL, 0);
}
int tldap_simple_bind_recv(struct tevent_req *req)
cred.data = (uint8_t *)"";
cred.length = 0;
}
- return tldap_sasl_bind(ld, dn, NULL, &cred, NULL, NULL);
+ return tldap_sasl_bind(ld, dn, NULL, &cred, NULL, 0, NULL, 0);
}
/*****************************************************************************/
const char **attrs,
int num_attrs,
int attrsonly,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls,
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls,
int timelimit,
int sizelimit,
int deref)
int tldap_search(struct tldap_context *ld,
const char *base, int scope, const char *filter,
const char **attrs, int num_attrs, int attrsonly,
- struct tldap_control **sctrls, struct tldap_control **cctrls,
+ struct tldap_control *sctrls, int num_sctrls,
+ struct tldap_control *cctrls, int num_cctrls,
int timelimit, int sizelimit, int deref,
TALLOC_CTX *mem_ctx, struct tldap_message ***entries,
struct tldap_message ***refs)
req = tldap_search_send(frame, ev, ld, base, scope, filter,
attrs, num_attrs, attrsonly,
- sctrls, cctrls, timelimit,
- sizelimit, deref);
+ sctrls, num_sctrls, cctrls, num_cctrls,
+ timelimit, sizelimit, deref);
if (req == NULL) {
state.rc = TLDAP_NO_MEMORY;
goto fail;
struct tevent_context *ev,
struct tldap_context *ld,
const char *dn,
- int num_attributes,
struct tldap_mod *attributes,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls)
+ int num_attributes,
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls)
{
struct tevent_req *req, *subreq;
struct tldap_req_state *state;
int tldap_add(struct tldap_context *ld, const char *dn,
int num_attributes, struct tldap_mod *attributes,
- struct tldap_control **sctrls, struct tldap_control **cctrls)
+ struct tldap_control *sctrls, int num_sctrls,
+ struct tldap_control *cctrls, int num_cctrls)
{
TALLOC_CTX *frame = talloc_stackframe();
struct tevent_context *ev;
goto fail;
}
- req = tldap_add_send(frame, ev, ld, dn, num_attributes, attributes,
- sctrls, cctrls);
+ req = tldap_add_send(frame, ev, ld, dn, attributes, num_attributes,
+ sctrls, num_sctrls, cctrls, num_cctrls);
if (req == NULL) {
result = TLDAP_NO_MEMORY;
goto fail;
struct tldap_context *ld,
const char *dn,
int num_mods, struct tldap_mod *mods,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls)
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls)
{
struct tevent_req *req, *subreq;
struct tldap_req_state *state;
int tldap_modify(struct tldap_context *ld, const char *dn,
int num_mods, struct tldap_mod *mods,
- struct tldap_control **sctrls, struct tldap_control **cctrls)
+ struct tldap_control *sctrls, int num_sctrls,
+ struct tldap_control *cctrls, int num_cctrls)
{
TALLOC_CTX *frame = talloc_stackframe();
struct tevent_context *ev;
}
req = tldap_modify_send(frame, ev, ld, dn, num_mods, mods,
- sctrls, cctrls);
+ sctrls, num_sctrls, cctrls, num_cctrls);
if (req == NULL) {
result = TLDAP_NO_MEMORY;
goto fail;
struct tevent_context *ev,
struct tldap_context *ld,
const char *dn,
- struct tldap_control **sctrls,
- struct tldap_control **cctrls)
+ struct tldap_control *sctrls,
+ int num_sctrls,
+ struct tldap_control *cctrls,
+ int num_cctrls)
{
struct tevent_req *req, *subreq;
struct tldap_req_state *state;
}
int tldap_delete(struct tldap_context *ld, const char *dn,
- struct tldap_control **sctrls, struct tldap_control **cctrls)
+ struct tldap_control *sctrls, int num_sctrls,
+ struct tldap_control *cctrls, int num_cctrls)
{
TALLOC_CTX *frame = talloc_stackframe();
struct tevent_context *ev;
goto fail;
}
- req = tldap_delete_send(frame, ev, ld, dn, sctrls, cctrls);
+ req = tldap_delete_send(frame, ev, ld, dn, sctrls, num_sctrls,
+ cctrls, num_cctrls);
if (req == NULL) {
result = TLDAP_NO_MEMORY;
goto fail;
}
ret = tldap_search(ld, base, scope, filter,
attrs, num_attrs, attrsonly,
- NULL /*sctrls*/, NULL /*cctrls*/,
+ NULL /*sctrls*/, 0, NULL /*cctrls*/, 0,
0 /*timelimit*/, 0 /*sizelimit*/, 0 /*deref*/,
mem_ctx, res, NULL);
TALLOC_FREE(filter);
subreq = tldap_search_send(
mem_ctx, ev, ld, "", TLDAP_SCOPE_BASE, "(objectclass=*)",
- attrs, ARRAY_SIZE(attrs), 0, NULL, NULL, 0, 0, 0);
+ attrs, ARRAY_SIZE(attrs), 0, NULL, 0, NULL, 0, 0, 0, 0);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
return NT_STATUS_NO_MEMORY;
}
- rc = tldap_add(state->ld, dn, num_mods, mods, NULL, NULL);
+ rc = tldap_add(state->ld, dn, num_mods, mods, NULL, 0, NULL, 0);
if (rc != TLDAP_SUCCESS) {
DEBUG(10, ("ldap_add failed %s\n",
tldap_errstr(debug_ctx(), state->ld, rc)));
return status;
}
- rc = tldap_delete(state->ld, dn, NULL, NULL);
+ rc = tldap_delete(state->ld, dn, NULL, 0, NULL, 0);
TALLOC_FREE(dn);
if (rc != TLDAP_SUCCESS) {
DEBUG(10, ("ldap_delete for %s failed: %s\n", dn,
return NT_STATUS_OK;
}
- rc = tldap_modify(state->ld, priv->dn, num_mods, mods, NULL, NULL);
+ rc = tldap_modify(state->ld, priv->dn, num_mods, mods, NULL, 0,
+ NULL, 0);
if (rc != TLDAP_SUCCESS) {
DEBUG(10, ("ldap_modify for %s failed: %s\n", priv->dn,
tldap_errstr(debug_ctx(), state->ld, rc)));
return NT_STATUS_NO_MEMORY;
}
- rc = tldap_add(state->ld, dn, num_mods, mods, NULL, NULL);
+ rc = tldap_add(state->ld, dn, num_mods, mods, NULL, 0, NULL, 0);
if (rc != TLDAP_SUCCESS) {
DEBUG(10, ("ldap_add failed %s\n",
tldap_errstr(debug_ctx(), state->ld, rc)));
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- rc = tldap_delete(state->ld, dn, NULL, NULL);
+ rc = tldap_delete(state->ld, dn, NULL, 0, NULL, 0);
if (rc != TLDAP_SUCCESS) {
DEBUG(10, ("ldap_delete failed: %s\n",
tldap_errstr(debug_ctx(), state->ld, rc)));
return NT_STATUS_NO_MEMORY;
}
- rc = tldap_modify(state->ld, groupdn, 1, mods, NULL, NULL);
+ rc = tldap_modify(state->ld, groupdn, 1, mods, NULL, 0, NULL, 0);
TALLOC_FREE(frame);
if (rc != TLDAP_SUCCESS) {
DEBUG(10, ("ldap_modify failed: %s\n",
return NT_STATUS_NO_MEMORY;
}
- rc = tldap_add(state->ld, dn, num_mods, mods, NULL, NULL);
+ rc = tldap_add(state->ld, dn, num_mods, mods, NULL, 0, NULL, 0);
if (rc != TLDAP_SUCCESS) {
DEBUG(10, ("ldap_add failed %s\n",
tldap_errstr(debug_ctx(), state->ld, rc)));
return NT_STATUS_INTERNAL_ERROR;
}
- rc = tldap_delete(state->ld, dn, NULL, NULL);
+ rc = tldap_delete(state->ld, dn, NULL, 0, NULL, 0);
if (rc != TLDAP_SUCCESS) {
DEBUG(10, ("ldap_delete failed: %s\n",
tldap_errstr(debug_ctx(), state->ld, rc)));
return NT_STATUS_OK;
}
- rc = tldap_modify(state->ld, dn, num_mods, mods, NULL, NULL);
+ rc = tldap_modify(state->ld, dn, num_mods, mods, NULL, 0, NULL, 0);
TALLOC_FREE(msg);
if (rc != TLDAP_SUCCESS) {
DEBUG(10, ("ldap_modify failed: %s\n",
return NT_STATUS_NO_MEMORY;
}
- rc = tldap_modify(state->ld, aliasdn, 1, mods, NULL, NULL);
+ rc = tldap_modify(state->ld, aliasdn, 1, mods, NULL, 0, NULL, 0);
TALLOC_FREE(frame);
if (rc != TLDAP_SUCCESS) {
DEBUG(10, ("ldap_modify failed: %s\n",