mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
use BER_BVNULL
This commit is contained in:
parent
bd7cd42669
commit
44725e7303
55 changed files with 159 additions and 159 deletions
|
|
@ -1207,7 +1207,7 @@ dn_match_cleanup:;
|
||||||
|
|
||||||
if ( b->a_group_pat.bv_len ) {
|
if ( b->a_group_pat.bv_len ) {
|
||||||
struct berval bv;
|
struct berval bv;
|
||||||
struct berval ndn = { 0, NULL };
|
struct berval ndn = BER_BVNULL;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if ( op->o_ndn.bv_len == 0 ) {
|
if ( op->o_ndn.bv_len == 0 ) {
|
||||||
|
|
@ -1763,14 +1763,14 @@ aci_match_set (
|
||||||
int setref
|
int setref
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
struct berval set = { 0, NULL };
|
struct berval set = BER_BVNULL;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
AciSetCookie cookie;
|
AciSetCookie cookie;
|
||||||
|
|
||||||
if (setref == 0) {
|
if (setref == 0) {
|
||||||
ber_dupbv_x( &set, subj, op->o_tmpmemctx );
|
ber_dupbv_x( &set, subj, op->o_tmpmemctx );
|
||||||
} else {
|
} else {
|
||||||
struct berval subjdn, ndn = { 0, NULL };
|
struct berval subjdn, ndn = BER_BVNULL;
|
||||||
struct berval setat;
|
struct berval setat;
|
||||||
BerVarray bvals;
|
BerVarray bvals;
|
||||||
const char *text;
|
const char *text;
|
||||||
|
|
|
||||||
|
|
@ -1875,7 +1875,7 @@ print_acl( Backend *be, AccessControl *a )
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( a->acl_filter != NULL ) {
|
if ( a->acl_filter != NULL ) {
|
||||||
struct berval bv = { 0, NULL };
|
struct berval bv = BER_BVNULL;
|
||||||
to++;
|
to++;
|
||||||
filter2bv( a->acl_filter, &bv );
|
filter2bv( a->acl_filter, &bv );
|
||||||
fprintf( stderr, " filter=%s\n", bv.bv_val );
|
fprintf( stderr, " filter=%s\n", bv.bv_val );
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ do_add( Operation *op, SlapReply *rs )
|
||||||
{
|
{
|
||||||
BerElement *ber = op->o_ber;
|
BerElement *ber = op->o_ber;
|
||||||
char *last;
|
char *last;
|
||||||
struct berval dn = { 0, NULL };
|
struct berval dn = BER_BVNULL;
|
||||||
ber_len_t len;
|
ber_len_t len;
|
||||||
ber_tag_t tag;
|
ber_tag_t tag;
|
||||||
Entry *e;
|
Entry *e;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ bdb_csn_commit(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
|
struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
|
||||||
struct berval ctxcsn_ndn = { 0, NULL };
|
struct berval ctxcsn_ndn = BER_BVNULL;
|
||||||
EntryInfo *ctxcsn_ei = NULL;
|
EntryInfo *ctxcsn_ei = NULL;
|
||||||
DB_LOCK ctxcsn_lock;
|
DB_LOCK ctxcsn_lock;
|
||||||
struct berval max_committed_csn;
|
struct berval max_committed_csn;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ static const struct bdbi_database {
|
||||||
{ NULL, NULL, 0, 0 }
|
{ NULL, NULL, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct berval bdb_uuid = { 0, NULL };
|
struct berval bdb_uuid = BER_BVNULL;
|
||||||
|
|
||||||
typedef void * db_malloc(size_t);
|
typedef void * db_malloc(size_t);
|
||||||
typedef void * db_realloc(void *, size_t);
|
typedef void * db_realloc(void *, size_t);
|
||||||
|
|
|
||||||
|
|
@ -376,7 +376,7 @@ bdb_do_search( Operation *op, SlapReply *rs, Operation *sop,
|
||||||
Entry *e = NULL, base;
|
Entry *e = NULL, base;
|
||||||
Entry *matched = NULL;
|
Entry *matched = NULL;
|
||||||
EntryInfo *ei;
|
EntryInfo *ei;
|
||||||
struct berval realbase = { 0, NULL };
|
struct berval realbase = BER_BVNULL;
|
||||||
int manageDSAit;
|
int manageDSAit;
|
||||||
int tentries = 0;
|
int tentries = 0;
|
||||||
ID lastid = NOID;
|
ID lastid = NOID;
|
||||||
|
|
@ -558,7 +558,7 @@ dn2entry_retry:
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( e == NULL ) {
|
if ( e == NULL ) {
|
||||||
struct berval matched_dn = { 0, NULL };
|
struct berval matched_dn = BER_BVNULL;
|
||||||
|
|
||||||
if ( matched != NULL ) {
|
if ( matched != NULL ) {
|
||||||
BerVarray erefs;
|
BerVarray erefs;
|
||||||
|
|
@ -1674,7 +1674,7 @@ send_pagerequest_response(
|
||||||
LDAPControl ctrl, *ctrls[2];
|
LDAPControl ctrl, *ctrls[2];
|
||||||
BerElementBuffer berbuf;
|
BerElementBuffer berbuf;
|
||||||
BerElement *ber = (BerElement *)&berbuf;
|
BerElement *ber = (BerElement *)&berbuf;
|
||||||
struct berval cookie = { 0, NULL };
|
struct berval cookie = BER_BVNULL;
|
||||||
PagedResultsCookie respcookie;
|
PagedResultsCookie respcookie;
|
||||||
|
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ dnssrv_back_search(
|
||||||
char *hostlist = NULL;
|
char *hostlist = NULL;
|
||||||
char **hosts = NULL;
|
char **hosts = NULL;
|
||||||
char *refdn;
|
char *refdn;
|
||||||
struct berval nrefdn = { 0, NULL };
|
struct berval nrefdn = BER_BVNULL;
|
||||||
BerVarray urls = NULL;
|
BerVarray urls = NULL;
|
||||||
int manageDSAit;
|
int manageDSAit;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ ldap_back_add(
|
||||||
Attribute *a;
|
Attribute *a;
|
||||||
LDAPMod **attrs;
|
LDAPMod **attrs;
|
||||||
struct berval mapped;
|
struct berval mapped;
|
||||||
struct berval mdn = { 0, NULL };
|
struct berval mdn = BER_BVNULL;
|
||||||
ber_int_t msgid;
|
ber_int_t msgid;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
int isupdate;
|
int isupdate;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ ldap_back_bind(
|
||||||
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
|
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
|
||||||
struct ldapconn *lc;
|
struct ldapconn *lc;
|
||||||
|
|
||||||
struct berval mdn = { 0, NULL };
|
struct berval mdn = BER_BVNULL;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
ber_int_t msgid;
|
ber_int_t msgid;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ ldap_back_compare(
|
||||||
{
|
{
|
||||||
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
|
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
|
||||||
struct ldapconn *lc;
|
struct ldapconn *lc;
|
||||||
struct berval mapped_at = { 0, NULL }, mapped_val = { 0, NULL };
|
struct berval mapped_at = BER_BVNULL, mapped_val = BER_BVNULL;
|
||||||
struct berval mdn = { 0, NULL };
|
struct berval mdn = BER_BVNULL;
|
||||||
ber_int_t msgid;
|
ber_int_t msgid;
|
||||||
int freeval = 0;
|
int freeval = 0;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ ldap_back_delete(
|
||||||
int rc = LDAP_SUCCESS;
|
int rc = LDAP_SUCCESS;
|
||||||
#endif /* LDAP_BACK_PROXY_AUTHZ */
|
#endif /* LDAP_BACK_PROXY_AUTHZ */
|
||||||
|
|
||||||
struct berval mdn = { 0, NULL };
|
struct berval mdn = BER_BVNULL;
|
||||||
|
|
||||||
lc = ldap_back_getconn( op, rs );
|
lc = ldap_back_getconn( op, rs );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ ldap_back_exop_passwd(
|
||||||
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
|
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
|
||||||
struct ldapconn *lc;
|
struct ldapconn *lc;
|
||||||
req_pwdexop_s *qpw = &op->oq_pwdexop;
|
req_pwdexop_s *qpw = &op->oq_pwdexop;
|
||||||
struct berval mdn = { 0, NULL }, newpw;
|
struct berval mdn = BER_BVNULL, newpw;
|
||||||
LDAPMessage *res;
|
LDAPMessage *res;
|
||||||
ber_int_t msgid;
|
ber_int_t msgid;
|
||||||
int rc, isproxy;
|
int rc, isproxy;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ ldap_back_modify(
|
||||||
Modifications *ml;
|
Modifications *ml;
|
||||||
int i, j, rc;
|
int i, j, rc;
|
||||||
struct berval mapped;
|
struct berval mapped;
|
||||||
struct berval mdn = { 0, NULL };
|
struct berval mdn = BER_BVNULL;
|
||||||
ber_int_t msgid;
|
ber_int_t msgid;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
int isupdate;
|
int isupdate;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ ldap_back_modrdn(
|
||||||
int rc = LDAP_SUCCESS;
|
int rc = LDAP_SUCCESS;
|
||||||
#endif /* LDAP_BACK_PROXY_AUTHZ */
|
#endif /* LDAP_BACK_PROXY_AUTHZ */
|
||||||
|
|
||||||
struct berval mdn = { 0, NULL }, mnewSuperior = { 0, NULL };
|
struct berval mdn = BER_BVNULL, mnewSuperior = BER_BVNULL;
|
||||||
|
|
||||||
lc = ldap_back_getconn( op, rs );
|
lc = ldap_back_getconn( op, rs );
|
||||||
if ( !lc || !ldap_back_dobind(lc, op, rs) ) {
|
if ( !lc || !ldap_back_dobind(lc, op, rs) ) {
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ ldap_build_entry( Operation *op, LDAPMessage *e, Entry *ent,
|
||||||
#define LDAP_BUILD_ENTRY_PRIVATE 0x01
|
#define LDAP_BUILD_ENTRY_PRIVATE 0x01
|
||||||
#define LDAP_BUILD_ENTRY_NORMALIZE 0x02
|
#define LDAP_BUILD_ENTRY_NORMALIZE 0x02
|
||||||
|
|
||||||
static struct berval dummy = { 0, NULL };
|
static struct berval dummy = BER_BVNULL;
|
||||||
|
|
||||||
int
|
int
|
||||||
ldap_back_search(
|
ldap_back_search(
|
||||||
|
|
@ -54,10 +54,10 @@ ldap_back_search(
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
LDAPMessage *res, *e;
|
LDAPMessage *res, *e;
|
||||||
int rc = 0, msgid;
|
int rc = 0, msgid;
|
||||||
struct berval match = { 0, NULL };
|
struct berval match = BER_BVNULL;
|
||||||
char **mapped_attrs = NULL;
|
char **mapped_attrs = NULL;
|
||||||
struct berval mbase;
|
struct berval mbase;
|
||||||
struct berval mfilter = { 0, NULL };
|
struct berval mfilter = BER_BVNULL;
|
||||||
int dontfreetext = 0;
|
int dontfreetext = 0;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
#ifdef LDAP_BACK_PROXY_AUTHZ
|
#ifdef LDAP_BACK_PROXY_AUTHZ
|
||||||
|
|
@ -532,7 +532,7 @@ ldap_back_entry_get(
|
||||||
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
|
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
|
||||||
struct ldapconn *lc;
|
struct ldapconn *lc;
|
||||||
int rc = 1, is_oc;
|
int rc = 1, is_oc;
|
||||||
struct berval mapped = { 0, NULL }, bdn, mdn;
|
struct berval mapped = BER_BVNULL, bdn, mdn;
|
||||||
LDAPMessage *result = NULL, *e = NULL;
|
LDAPMessage *result = NULL, *e = NULL;
|
||||||
char *gattr[3];
|
char *gattr[3];
|
||||||
char *filter = NULL;
|
char *filter = NULL;
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,8 @@ ldbm_back_modrdn(
|
||||||
AttributeDescription *entry = slap_schema.si_ad_entry;
|
AttributeDescription *entry = slap_schema.si_ad_entry;
|
||||||
struct ldbminfo *li = (struct ldbminfo *) op->o_bd->be_private;
|
struct ldbminfo *li = (struct ldbminfo *) op->o_bd->be_private;
|
||||||
struct berval p_dn, p_ndn;
|
struct berval p_dn, p_ndn;
|
||||||
struct berval new_dn = { 0, NULL}, new_ndn = { 0, NULL };
|
struct berval new_dn = BER_BVNULL, new_ndn = BER_BVNULL;
|
||||||
struct berval old_ndn = { 0, NULL };
|
struct berval old_ndn = BER_BVNULL;
|
||||||
Entry *e, *p = NULL;
|
Entry *e, *p = NULL;
|
||||||
Entry *matched;
|
Entry *matched;
|
||||||
/* LDAP v2 supporting correct attribute handling. */
|
/* LDAP v2 supporting correct attribute handling. */
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ ldbm_back_search(
|
||||||
ID id, cursor;
|
ID id, cursor;
|
||||||
Entry *e;
|
Entry *e;
|
||||||
Entry *matched = NULL;
|
Entry *matched = NULL;
|
||||||
struct berval realbase = { 0, NULL };
|
struct berval realbase = BER_BVNULL;
|
||||||
int manageDSAit = get_manageDSAit( op );
|
int manageDSAit = get_manageDSAit( op );
|
||||||
|
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
|
|
@ -86,7 +86,7 @@ ldbm_back_search(
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( e == NULL ) {
|
if ( e == NULL ) {
|
||||||
struct berval matched_dn = { 0, NULL };
|
struct berval matched_dn = BER_BVNULL;
|
||||||
|
|
||||||
if ( matched != NULL ) {
|
if ( matched != NULL ) {
|
||||||
BerVarray erefs;
|
BerVarray erefs;
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ meta_back_add( Operation *op, SlapReply *rs )
|
||||||
int i, candidate = -1;
|
int i, candidate = -1;
|
||||||
Attribute *a;
|
Attribute *a;
|
||||||
LDAPMod **attrs;
|
LDAPMod **attrs;
|
||||||
struct berval mdn = { 0, NULL }, mapped;
|
struct berval mdn = BER_BVNULL, mapped;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
|
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ meta_back_do_single_bind(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
struct metainfo *li = ( struct metainfo * )op->o_bd->be_private;
|
struct metainfo *li = ( struct metainfo * )op->o_bd->be_private;
|
||||||
struct berval mdn = { 0, NULL };
|
struct berval mdn = BER_BVNULL;
|
||||||
ber_int_t msgid;
|
ber_int_t msgid;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
struct metasingleconn *lsc = &lc->conns[ candidate ];
|
struct metasingleconn *lsc = &lc->conns[ candidate ];
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ meta_back_compare( Operation *op, SlapReply *rs )
|
||||||
struct metaconn *lc;
|
struct metaconn *lc;
|
||||||
struct metasingleconn *lsc;
|
struct metasingleconn *lsc;
|
||||||
char *match = NULL, *err = NULL;
|
char *match = NULL, *err = NULL;
|
||||||
struct berval mmatch = { 0, NULL };
|
struct berval mmatch = BER_BVNULL;
|
||||||
int candidates = 0, last = 0, i, count = 0, rc;
|
int candidates = 0, last = 0, i, count = 0, rc;
|
||||||
int cres = LDAP_SUCCESS, rres = LDAP_SUCCESS;
|
int cres = LDAP_SUCCESS, rres = LDAP_SUCCESS;
|
||||||
int *msgid;
|
int *msgid;
|
||||||
|
|
@ -70,7 +70,7 @@ meta_back_compare( Operation *op, SlapReply *rs )
|
||||||
dc.ctx = "compareDN";
|
dc.ctx = "compareDN";
|
||||||
|
|
||||||
for ( i = 0, lsc = lc->conns; !META_LAST(lsc); ++i, ++lsc ) {
|
for ( i = 0, lsc = lc->conns; !META_LAST(lsc); ++i, ++lsc ) {
|
||||||
struct berval mdn = { 0, NULL };
|
struct berval mdn = BER_BVNULL;
|
||||||
struct berval mapped_attr = op->oq_compare.rs_ava->aa_desc->ad_cname;
|
struct berval mapped_attr = op->oq_compare.rs_ava->aa_desc->ad_cname;
|
||||||
struct berval mapped_value = op->oq_compare.rs_ava->aa_value;
|
struct berval mapped_value = op->oq_compare.rs_ava->aa_value;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ meta_back_delete( Operation *op, SlapReply *rs )
|
||||||
struct metainfo *li = ( struct metainfo * )op->o_bd->be_private;
|
struct metainfo *li = ( struct metainfo * )op->o_bd->be_private;
|
||||||
struct metaconn *lc;
|
struct metaconn *lc;
|
||||||
int candidate = -1;
|
int candidate = -1;
|
||||||
struct berval mdn = { 0, NULL };
|
struct berval mdn = BER_BVNULL;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
|
|
||||||
lc = meta_back_getconn( op, rs, META_OP_REQUIRE_SINGLE,
|
lc = meta_back_getconn( op, rs, META_OP_REQUIRE_SINGLE,
|
||||||
|
|
|
||||||
|
|
@ -56,9 +56,9 @@ meta_back_group(
|
||||||
char *gattr[ 2 ];
|
char *gattr[ 2 ];
|
||||||
char *filter = NULL, *ptr;
|
char *filter = NULL, *ptr;
|
||||||
LDAP *ld = NULL;
|
LDAP *ld = NULL;
|
||||||
struct berval mop_ndn = { 0, NULL }, mgr_ndn = { 0, NULL };
|
struct berval mop_ndn = BER_BVNULL, mgr_ndn = BER_BVNULL;
|
||||||
|
|
||||||
struct berval group_oc_name = { 0, NULL };
|
struct berval group_oc_name = BER_BVNULL;
|
||||||
struct berval group_at_name = group_at->ad_cname;
|
struct berval group_at_name = group_at->ad_cname;
|
||||||
|
|
||||||
if ( group_oc->soc_names && group_oc->soc_names[ 0 ] ) {
|
if ( group_oc->soc_names && group_oc->soc_names[ 0 ] ) {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ meta_back_modify( Operation *op, SlapReply *rs )
|
||||||
LDAPMod *mods = NULL;
|
LDAPMod *mods = NULL;
|
||||||
Modifications *ml;
|
Modifications *ml;
|
||||||
int candidate = -1, i;
|
int candidate = -1, i;
|
||||||
struct berval mdn = { 0, NULL };
|
struct berval mdn = BER_BVNULL;
|
||||||
struct berval mapped;
|
struct berval mapped;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,8 @@ meta_back_modrdn( Operation *op, SlapReply *rs )
|
||||||
struct metaconn *lc;
|
struct metaconn *lc;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
int candidate = -1;
|
int candidate = -1;
|
||||||
struct berval mdn = { 0, NULL },
|
struct berval mdn = BER_BVNULL,
|
||||||
mnewSuperior = { 0, NULL };
|
mnewSuperior = BER_BVNULL;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
|
|
||||||
lc = meta_back_getconn( op, rs, META_OP_REQUIRE_SINGLE,
|
lc = meta_back_getconn( op, rs, META_OP_REQUIRE_SINGLE,
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ meta_back_search( Operation *op, SlapReply *rs )
|
||||||
LDAPMessage *res = NULL, *e;
|
LDAPMessage *res = NULL, *e;
|
||||||
int rc = 0, *msgid, sres = LDAP_SUCCESS;
|
int rc = 0, *msgid, sres = LDAP_SUCCESS;
|
||||||
char *err = NULL;
|
char *err = NULL;
|
||||||
struct berval match = { 0, NULL }, mmatch = { 0, NULL };
|
struct berval match = BER_BVNULL, mmatch = BER_BVNULL;
|
||||||
BerVarray v2refs = NULL;
|
BerVarray v2refs = NULL;
|
||||||
|
|
||||||
int i, last = 0, candidates = 0, initial_candidates = 0,
|
int i, last = 0, candidates = 0, initial_candidates = 0,
|
||||||
|
|
@ -110,8 +110,8 @@ meta_back_search( Operation *op, SlapReply *rs )
|
||||||
struct berval realbase = op->o_req_dn;
|
struct berval realbase = op->o_req_dn;
|
||||||
int realscope = op->ors_scope;
|
int realscope = op->ors_scope;
|
||||||
ber_len_t suffixlen = 0;
|
ber_len_t suffixlen = 0;
|
||||||
struct berval mbase = { 0, NULL };
|
struct berval mbase = BER_BVNULL;
|
||||||
struct berval mfilter = { 0, NULL };
|
struct berval mfilter = BER_BVNULL;
|
||||||
char **mapped_attrs = NULL;
|
char **mapped_attrs = NULL;
|
||||||
|
|
||||||
if ( lsc->candidate != META_CANDIDATE ) {
|
if ( lsc->candidate != META_CANDIDATE ) {
|
||||||
|
|
@ -558,7 +558,7 @@ meta_send_entry(
|
||||||
Entry ent = {0};
|
Entry ent = {0};
|
||||||
BerElement ber = *e->lm_ber;
|
BerElement ber = *e->lm_ber;
|
||||||
Attribute *attr, **attrp;
|
Attribute *attr, **attrp;
|
||||||
struct berval dummy = { 0, NULL };
|
struct berval dummy = BER_BVNULL;
|
||||||
struct berval *bv, bdn;
|
struct berval *bv, bdn;
|
||||||
const char *text;
|
const char *text;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
|
|
|
||||||
|
|
@ -41,21 +41,21 @@ static struct {
|
||||||
struct berval s;
|
struct berval s;
|
||||||
struct berval n;
|
struct berval n;
|
||||||
} int_2_level[] = {
|
} int_2_level[] = {
|
||||||
{ LDAP_DEBUG_TRACE, BER_BVC("Trace"), { 0, NULL } },
|
{ LDAP_DEBUG_TRACE, BER_BVC("Trace"), BER_BVNULL },
|
||||||
{ LDAP_DEBUG_PACKETS, BER_BVC("Packets"), { 0, NULL } },
|
{ LDAP_DEBUG_PACKETS, BER_BVC("Packets"), BER_BVNULL },
|
||||||
{ LDAP_DEBUG_ARGS, BER_BVC("Args"), { 0, NULL } },
|
{ LDAP_DEBUG_ARGS, BER_BVC("Args"), BER_BVNULL },
|
||||||
{ LDAP_DEBUG_CONNS, BER_BVC("Conns"), { 0, NULL } },
|
{ LDAP_DEBUG_CONNS, BER_BVC("Conns"), BER_BVNULL },
|
||||||
{ LDAP_DEBUG_BER, BER_BVC("BER"), { 0, NULL } },
|
{ LDAP_DEBUG_BER, BER_BVC("BER"), BER_BVNULL },
|
||||||
{ LDAP_DEBUG_FILTER, BER_BVC("Filter"), { 0, NULL } },
|
{ LDAP_DEBUG_FILTER, BER_BVC("Filter"), BER_BVNULL },
|
||||||
{ LDAP_DEBUG_CONFIG, BER_BVC("Config"), { 0, NULL } }, /* useless */
|
{ LDAP_DEBUG_CONFIG, BER_BVC("Config"), BER_BVNULL }, /* useless */
|
||||||
{ LDAP_DEBUG_ACL, BER_BVC("ACL"), { 0, NULL } },
|
{ LDAP_DEBUG_ACL, BER_BVC("ACL"), BER_BVNULL },
|
||||||
{ LDAP_DEBUG_STATS, BER_BVC("Stats"), { 0, NULL } },
|
{ LDAP_DEBUG_STATS, BER_BVC("Stats"), BER_BVNULL },
|
||||||
{ LDAP_DEBUG_STATS2, BER_BVC("Stats2"), { 0, NULL } },
|
{ LDAP_DEBUG_STATS2, BER_BVC("Stats2"), BER_BVNULL },
|
||||||
{ LDAP_DEBUG_SHELL, BER_BVC("Shell"), { 0, NULL } },
|
{ LDAP_DEBUG_SHELL, BER_BVC("Shell"), BER_BVNULL },
|
||||||
{ LDAP_DEBUG_PARSE, BER_BVC("Parse"), { 0, NULL } },
|
{ LDAP_DEBUG_PARSE, BER_BVC("Parse"), BER_BVNULL },
|
||||||
{ LDAP_DEBUG_CACHE, BER_BVC("Cache"), { 0, NULL } },
|
{ LDAP_DEBUG_CACHE, BER_BVC("Cache"), BER_BVNULL },
|
||||||
{ LDAP_DEBUG_INDEX, BER_BVC("Index"), { 0, NULL } },
|
{ LDAP_DEBUG_INDEX, BER_BVC("Index"), BER_BVNULL },
|
||||||
{ 0, { 0, NULL }, { 0, NULL } }
|
{ 0, BER_BVNULL, BER_BVNULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static int loglevel2int( struct berval *l );
|
static int loglevel2int( struct berval *l );
|
||||||
|
|
@ -79,7 +79,7 @@ monitor_subsys_log_init(
|
||||||
struct berval desc[] = {
|
struct berval desc[] = {
|
||||||
BER_BVC("This entry allows to set the log level runtime."),
|
BER_BVC("This entry allows to set the log level runtime."),
|
||||||
BER_BVC("Set the attribute 'managedInfo' to the desired log levels."),
|
BER_BVC("Set the attribute 'managedInfo' to the desired log levels."),
|
||||||
{ 0, NULL }
|
BER_BVNULL
|
||||||
};
|
};
|
||||||
|
|
||||||
ldap_pvt_thread_mutex_init( &monitor_log_mutex );
|
ldap_pvt_thread_mutex_init( &monitor_log_mutex );
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ static struct berval
|
||||||
BER_BVC( "Search" ),
|
BER_BVC( "Search" ),
|
||||||
BER_BVC( "Abandon" ),
|
BER_BVC( "Abandon" ),
|
||||||
BER_BVC( "Extended" ),
|
BER_BVC( "Extended" ),
|
||||||
{ 0, NULL }
|
BER_BVNULL
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ passwd_back_search(
|
||||||
time_t stoptime;
|
time_t stoptime;
|
||||||
|
|
||||||
LDAPRDN rdn = NULL;
|
LDAPRDN rdn = NULL;
|
||||||
struct berval parent = { 0, NULL };
|
struct berval parent = BER_BVNULL;
|
||||||
|
|
||||||
AttributeDescription *ad_objectClass = slap_schema.si_ad_objectClass;
|
AttributeDescription *ad_objectClass = slap_schema.si_ad_objectClass;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@ do_bind(
|
||||||
BerElement *ber = op->o_ber;
|
BerElement *ber = op->o_ber;
|
||||||
ber_int_t version;
|
ber_int_t version;
|
||||||
ber_tag_t method;
|
ber_tag_t method;
|
||||||
struct berval mech = { 0, NULL };
|
struct berval mech = BER_BVNULL;
|
||||||
struct berval dn = { 0, NULL };
|
struct berval dn = BER_BVNULL;
|
||||||
ber_tag_t tag;
|
ber_tag_t tag;
|
||||||
Backend *be = NULL;
|
Backend *be = NULL;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,10 @@ do_compare(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Entry *entry = NULL;
|
Entry *entry = NULL;
|
||||||
struct berval dn = { 0, NULL };
|
struct berval dn = BER_BVNULL;
|
||||||
struct berval desc = { 0, NULL };
|
struct berval desc = BER_BVNULL;
|
||||||
struct berval value = { 0, NULL };
|
struct berval value = BER_BVNULL;
|
||||||
AttributeAssertion ava = { NULL, { 0, NULL } };
|
AttributeAssertion ava = { NULL, BER_BVNULL };
|
||||||
int manageDSAit;
|
int manageDSAit;
|
||||||
|
|
||||||
ava.aa_desc = NULL;
|
ava.aa_desc = NULL;
|
||||||
|
|
|
||||||
|
|
@ -73,11 +73,11 @@ char *ldap_srvtab = "";
|
||||||
char **default_passwd_hash = NULL;
|
char **default_passwd_hash = NULL;
|
||||||
int cargc = 0, cargv_size = 0;
|
int cargc = 0, cargv_size = 0;
|
||||||
char **cargv;
|
char **cargv;
|
||||||
struct berval default_search_base = { 0, NULL };
|
struct berval default_search_base = BER_BVNULL;
|
||||||
struct berval default_search_nbase = { 0, NULL };
|
struct berval default_search_nbase = BER_BVNULL;
|
||||||
unsigned num_subordinates = 0;
|
unsigned num_subordinates = 0;
|
||||||
struct berval global_schemadn = { 0, NULL };
|
struct berval global_schemadn = BER_BVNULL;
|
||||||
struct berval global_schemandn = { 0, NULL };
|
struct berval global_schemandn = BER_BVNULL;
|
||||||
|
|
||||||
ber_len_t sockbuf_max_incoming = SLAP_SB_MAX_INCOMING_DEFAULT;
|
ber_len_t sockbuf_max_incoming = SLAP_SB_MAX_INCOMING_DEFAULT;
|
||||||
ber_len_t sockbuf_max_incoming_auth= SLAP_SB_MAX_INCOMING_AUTH;
|
ber_len_t sockbuf_max_incoming_auth= SLAP_SB_MAX_INCOMING_AUTH;
|
||||||
|
|
|
||||||
|
|
@ -1318,7 +1318,7 @@ int connection_read(ber_socket_t s)
|
||||||
|
|
||||||
} else if ( rc == 0 ) {
|
} else if ( rc == 0 ) {
|
||||||
void *ssl;
|
void *ssl;
|
||||||
struct berval authid = { 0, NULL };
|
struct berval authid = BER_BVNULL;
|
||||||
|
|
||||||
c->c_needs_tls_accept = 0;
|
c->c_needs_tls_accept = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -714,7 +714,7 @@ static int parseProxyAuthz (
|
||||||
LDAPControl *ctrl )
|
LDAPControl *ctrl )
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
struct berval dn = { 0, NULL };
|
struct berval dn = BER_BVNULL;
|
||||||
|
|
||||||
if ( op->o_proxy_authz != SLAP_NO_CONTROL ) {
|
if ( op->o_proxy_authz != SLAP_NO_CONTROL ) {
|
||||||
rs->sr_text = "proxy authorization control specified multiple times";
|
rs->sr_text = "proxy authorization control specified multiple times";
|
||||||
|
|
@ -840,7 +840,7 @@ static int parsePagedResults (
|
||||||
ber_tag_t tag;
|
ber_tag_t tag;
|
||||||
ber_int_t size;
|
ber_int_t size;
|
||||||
BerElement *ber;
|
BerElement *ber;
|
||||||
struct berval cookie = { 0, NULL };
|
struct berval cookie = BER_BVNULL;
|
||||||
|
|
||||||
if ( op->o_pagedresults != SLAP_NO_CONTROL ) {
|
if ( op->o_pagedresults != SLAP_NO_CONTROL ) {
|
||||||
rs->sr_text = "paged results control specified multiple times";
|
rs->sr_text = "paged results control specified multiple times";
|
||||||
|
|
@ -919,7 +919,7 @@ static int parseAssert (
|
||||||
LDAPControl *ctrl )
|
LDAPControl *ctrl )
|
||||||
{
|
{
|
||||||
BerElement *ber;
|
BerElement *ber;
|
||||||
struct berval fstr = { 0, NULL };
|
struct berval fstr = BER_BVNULL;
|
||||||
const char *err_msg = "";
|
const char *err_msg = "";
|
||||||
|
|
||||||
if ( op->o_assert != SLAP_NO_CONTROL ) {
|
if ( op->o_assert != SLAP_NO_CONTROL ) {
|
||||||
|
|
@ -1094,7 +1094,7 @@ int parseValuesReturnFilter (
|
||||||
LDAPControl *ctrl )
|
LDAPControl *ctrl )
|
||||||
{
|
{
|
||||||
BerElement *ber;
|
BerElement *ber;
|
||||||
struct berval fstr = { 0, NULL };
|
struct berval fstr = BER_BVNULL;
|
||||||
const char *err_msg = "";
|
const char *err_msg = "";
|
||||||
|
|
||||||
if ( op->o_valuesreturnfilter != SLAP_NO_CONTROL ) {
|
if ( op->o_valuesreturnfilter != SLAP_NO_CONTROL ) {
|
||||||
|
|
|
||||||
|
|
@ -1490,7 +1490,7 @@ slapd_daemon_task(
|
||||||
socklen_t len = sizeof(from);
|
socklen_t len = sizeof(from);
|
||||||
long id;
|
long id;
|
||||||
slap_ssf_t ssf = 0;
|
slap_ssf_t ssf = 0;
|
||||||
struct berval authid = { 0, NULL };
|
struct berval authid = BER_BVNULL;
|
||||||
#ifdef SLAPD_RLOOKUPS
|
#ifdef SLAPD_RLOOKUPS
|
||||||
char hbuf[NI_MAXHOST];
|
char hbuf[NI_MAXHOST];
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,12 @@ do_delete(
|
||||||
SlapReply *rs
|
SlapReply *rs
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
struct berval dn = { 0, NULL };
|
struct berval dn = BER_BVNULL;
|
||||||
struct berval pdn = { 0, NULL };
|
struct berval pdn = BER_BVNULL;
|
||||||
struct berval org_req_dn = { 0, NULL };
|
struct berval org_req_dn = BER_BVNULL;
|
||||||
struct berval org_req_ndn = { 0, NULL };
|
struct berval org_req_ndn = BER_BVNULL;
|
||||||
struct berval org_dn = { 0, NULL };
|
struct berval org_dn = BER_BVNULL;
|
||||||
struct berval org_ndn = { 0, NULL };
|
struct berval org_ndn = BER_BVNULL;
|
||||||
int org_managedsait;
|
int org_managedsait;
|
||||||
int manageDSAit;
|
int manageDSAit;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -259,7 +259,7 @@ LDAPDN_rewrite( LDAPDN dn, unsigned flags, void *ctx )
|
||||||
slap_mr_normalize_func *normf = NULL;
|
slap_mr_normalize_func *normf = NULL;
|
||||||
slap_syntax_transform_func *transf = NULL;
|
slap_syntax_transform_func *transf = NULL;
|
||||||
MatchingRule *mr = NULL;
|
MatchingRule *mr = NULL;
|
||||||
struct berval bv = { 0, NULL };
|
struct berval bv = BER_BVNULL;
|
||||||
int do_sort = 0;
|
int do_sort = 0;
|
||||||
|
|
||||||
assert( ava );
|
assert( ava );
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ slap_build_sync_state_ctrl(
|
||||||
BerElementBuffer berbuf;
|
BerElementBuffer berbuf;
|
||||||
BerElement *ber = (BerElement *)&berbuf;
|
BerElement *ber = (BerElement *)&berbuf;
|
||||||
|
|
||||||
struct berval entryuuid_bv = { 0, NULL };
|
struct berval entryuuid_bv = BER_BVNULL;
|
||||||
|
|
||||||
ber_init2( ber, 0, LBER_USE_DER );
|
ber_init2( ber, 0, LBER_USE_DER );
|
||||||
ber_set_option( ber, LBER_OPT_BER_MEMCTX, &op->o_tmpmemctx );
|
ber_set_option( ber, LBER_OPT_BER_MEMCTX, &op->o_tmpmemctx );
|
||||||
|
|
@ -173,7 +173,7 @@ slap_build_sync_state_ctrl_from_slog(
|
||||||
BerElementBuffer berbuf;
|
BerElementBuffer berbuf;
|
||||||
BerElement *ber = (BerElement *)&berbuf;
|
BerElement *ber = (BerElement *)&berbuf;
|
||||||
|
|
||||||
struct berval entryuuid_bv = { 0, NULL };
|
struct berval entryuuid_bv = BER_BVNULL;
|
||||||
|
|
||||||
ber_init2( ber, NULL, LBER_USE_DER );
|
ber_init2( ber, NULL, LBER_USE_DER );
|
||||||
ber_set_option( ber, LBER_OPT_BER_MEMCTX, &op->o_tmpmemctx );
|
ber_set_option( ber, LBER_OPT_BER_MEMCTX, &op->o_tmpmemctx );
|
||||||
|
|
@ -444,9 +444,9 @@ slap_init_sync_cookie_ctxcsn(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
char csnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE + 4 ];
|
char csnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE + 4 ];
|
||||||
struct berval octet_str = { 0, NULL };
|
struct berval octet_str = BER_BVNULL;
|
||||||
struct berval ctxcsn = { 0, NULL };
|
struct berval ctxcsn = BER_BVNULL;
|
||||||
struct berval ctxcsn_dup = { 0, NULL };
|
struct berval ctxcsn_dup = BER_BVNULL;
|
||||||
struct berval slap_syncCookie;
|
struct berval slap_syncCookie;
|
||||||
|
|
||||||
if ( cookie == NULL )
|
if ( cookie == NULL )
|
||||||
|
|
@ -523,7 +523,7 @@ slap_build_syncUUID_set(
|
||||||
int ret;
|
int ret;
|
||||||
Attribute* a;
|
Attribute* a;
|
||||||
|
|
||||||
struct berval entryuuid_bv = { 0, NULL };
|
struct berval entryuuid_bv = BER_BVNULL;
|
||||||
|
|
||||||
for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
|
for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
|
||||||
AttributeDescription *desc = a->a_desc;
|
AttributeDescription *desc = a->a_desc;
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ int main( int argc, char **argv )
|
||||||
char *serverName;
|
char *serverName;
|
||||||
int serverMode = SLAP_SERVER_MODE;
|
int serverMode = SLAP_SERVER_MODE;
|
||||||
|
|
||||||
struct berval cookie = { 0, NULL };
|
struct berval cookie = BER_BVNULL;
|
||||||
struct sync_cookie *scp = NULL;
|
struct sync_cookie *scp = NULL;
|
||||||
struct sync_cookie *scp_entry = NULL;
|
struct sync_cookie *scp_entry = NULL;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ do_modify(
|
||||||
Operation *op,
|
Operation *op,
|
||||||
SlapReply *rs )
|
SlapReply *rs )
|
||||||
{
|
{
|
||||||
struct berval dn = { 0, NULL };
|
struct berval dn = BER_BVNULL;
|
||||||
char *last;
|
char *last;
|
||||||
ber_tag_t tag;
|
ber_tag_t tag;
|
||||||
ber_len_t len;
|
ber_len_t len;
|
||||||
|
|
|
||||||
|
|
@ -50,24 +50,24 @@ do_modrdn(
|
||||||
SlapReply *rs
|
SlapReply *rs
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
struct berval dn = { 0, NULL };
|
struct berval dn = BER_BVNULL;
|
||||||
struct berval newrdn = { 0, NULL };
|
struct berval newrdn = BER_BVNULL;
|
||||||
struct berval newSuperior = { 0, NULL };
|
struct berval newSuperior = BER_BVNULL;
|
||||||
ber_int_t deloldrdn;
|
ber_int_t deloldrdn;
|
||||||
|
|
||||||
struct berval pnewSuperior = { 0, NULL };
|
struct berval pnewSuperior = BER_BVNULL;
|
||||||
|
|
||||||
struct berval nnewSuperior = { 0, NULL };
|
struct berval nnewSuperior = BER_BVNULL;
|
||||||
|
|
||||||
Backend *newSuperior_be = NULL;
|
Backend *newSuperior_be = NULL;
|
||||||
ber_len_t length;
|
ber_len_t length;
|
||||||
int manageDSAit;
|
int manageDSAit;
|
||||||
|
|
||||||
struct berval pdn = { 0, NULL };
|
struct berval pdn = BER_BVNULL;
|
||||||
struct berval org_req_dn = { 0, NULL };
|
struct berval org_req_dn = BER_BVNULL;
|
||||||
struct berval org_req_ndn = { 0, NULL };
|
struct berval org_req_ndn = BER_BVNULL;
|
||||||
struct berval org_dn = { 0, NULL };
|
struct berval org_dn = BER_BVNULL;
|
||||||
struct berval org_ndn = { 0, NULL };
|
struct berval org_ndn = BER_BVNULL;
|
||||||
int org_managedsait;
|
int org_managedsait;
|
||||||
|
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,9 @@ get_mra(
|
||||||
int rc;
|
int rc;
|
||||||
ber_tag_t tag, rtag;
|
ber_tag_t tag, rtag;
|
||||||
ber_len_t length;
|
ber_len_t length;
|
||||||
struct berval type = { 0, NULL };
|
struct berval type = BER_BVNULL;
|
||||||
struct berval value = { 0, NULL };
|
struct berval value = BER_BVNULL;
|
||||||
struct berval rule_text = { 0, NULL };
|
struct berval rule_text = BER_BVNULL;
|
||||||
MatchingRuleAssertion ma;
|
MatchingRuleAssertion ma;
|
||||||
|
|
||||||
memset( &ma, 0, sizeof ma);
|
memset( &ma, 0, sizeof ma);
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ static int base_scope_compare(
|
||||||
int scope_stored,
|
int scope_stored,
|
||||||
int scope_incoming )
|
int scope_incoming )
|
||||||
{
|
{
|
||||||
struct berval pdn_incoming = { 0, NULL };
|
struct berval pdn_incoming = BER_BVNULL;
|
||||||
|
|
||||||
if (scope_stored < scope_incoming)
|
if (scope_stored < scope_incoming)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -1246,7 +1246,7 @@ ppolicy_modify( Operation *op, SlapReply *rs )
|
||||||
pw_hist *tl = NULL, *p;
|
pw_hist *tl = NULL, *p;
|
||||||
int zapReset, send_ctrl = 0;
|
int zapReset, send_ctrl = 0;
|
||||||
Entry *e;
|
Entry *e;
|
||||||
struct berval newpw = { 0, NULL }, oldpw = { 0, NULL },
|
struct berval newpw = BER_BVNULL, oldpw = BER_BVNULL,
|
||||||
*bv, cr[2];
|
*bv, cr[2];
|
||||||
LDAPPasswordPolicyError pErr = PP_noError;
|
LDAPPasswordPolicyError pErr = PP_noError;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ rwm_op_dn_massage( Operation *op, SlapReply *rs, void *cookie )
|
||||||
struct ldaprwmap *rwmap =
|
struct ldaprwmap *rwmap =
|
||||||
(struct ldaprwmap *)on->on_bi.bi_private;
|
(struct ldaprwmap *)on->on_bi.bi_private;
|
||||||
|
|
||||||
struct berval dn, ndn, mdn = { 0, NULL };
|
struct berval dn, ndn, mdn = BER_BVNULL;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
|
|
||||||
|
|
@ -200,8 +200,8 @@ rwm_compare( Operation *op, SlapReply *rs )
|
||||||
(struct ldaprwmap *)on->on_bi.bi_private;
|
(struct ldaprwmap *)on->on_bi.bi_private;
|
||||||
|
|
||||||
int rc;
|
int rc;
|
||||||
struct berval mapped_at = { 0, NULL },
|
struct berval mapped_at = BER_BVNULL,
|
||||||
mapped_vals[2] = { { 0, NULL }, { 0, NULL } };
|
mapped_vals[2] = { BER_BVNULL, BER_BVNULL };
|
||||||
|
|
||||||
#ifdef ENABLE_REWRITE
|
#ifdef ENABLE_REWRITE
|
||||||
rc = rwm_op_dn_massage( op, rs, "compareDn" );
|
rc = rwm_op_dn_massage( op, rs, "compareDn" );
|
||||||
|
|
@ -422,7 +422,7 @@ rwm_send_entry( Operation *op, SlapReply *rs )
|
||||||
(struct ldaprwmap *)on->on_bi.bi_private;
|
(struct ldaprwmap *)on->on_bi.bi_private;
|
||||||
|
|
||||||
Entry *e = NULL;
|
Entry *e = NULL;
|
||||||
struct berval dn = { 0, NULL }, ndn = { 0, NULL };
|
struct berval dn = BER_BVNULL, ndn = BER_BVNULL;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
int rc = SLAP_CB_CONTINUE;
|
int rc = SLAP_CB_CONTINUE;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,9 @@ static char * referral_dn_muck(
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
struct berval bvin;
|
struct berval bvin;
|
||||||
struct berval nrefDN = { 0, NULL };
|
struct berval nrefDN = BER_BVNULL;
|
||||||
struct berval nbaseDN = { 0, NULL };
|
struct berval nbaseDN = BER_BVNULL;
|
||||||
struct berval ntargetDN = { 0, NULL };
|
struct berval ntargetDN = BER_BVNULL;
|
||||||
|
|
||||||
if( !baseDN ) {
|
if( !baseDN ) {
|
||||||
/* no base, return target */
|
/* no base, return target */
|
||||||
|
|
|
||||||
|
|
@ -1615,9 +1615,9 @@ char* slap_sasl_secprops( const char *in )
|
||||||
int
|
int
|
||||||
slap_sasl_setpass( Operation *op, SlapReply *rs )
|
slap_sasl_setpass( Operation *op, SlapReply *rs )
|
||||||
{
|
{
|
||||||
struct berval id = { 0, NULL }; /* needs to come from connection */
|
struct berval id = BER_BVNULL; /* needs to come from connection */
|
||||||
struct berval new = { 0, NULL };
|
struct berval new = BER_BVNULL;
|
||||||
struct berval old = { 0, NULL };
|
struct berval old = BER_BVNULL;
|
||||||
|
|
||||||
assert( ber_bvcmp( &slap_EXOP_MODIFY_PASSWD, &op->ore_reqoid ) == 0 );
|
assert( ber_bvcmp( &slap_EXOP_MODIFY_PASSWD, &op->ore_reqoid ) == 0 );
|
||||||
|
|
||||||
|
|
@ -1783,7 +1783,7 @@ int slap_sasl_getdn( Connection *conn, Operation *op, char *id, int len,
|
||||||
/* Username strings */
|
/* Username strings */
|
||||||
if( is_dn == SET_U ) {
|
if( is_dn == SET_U ) {
|
||||||
char *p;
|
char *p;
|
||||||
struct berval realm = { 0, NULL }, c1 = *dn;
|
struct berval realm = BER_BVNULL, c1 = *dn;
|
||||||
|
|
||||||
len = dn->bv_len + sizeof("uid=")-1 + sizeof(",cn=auth")-1;
|
len = dn->bv_len + sizeof("uid=")-1 + sizeof(",cn=auth")-1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -276,9 +276,9 @@ is_dn: bv.bv_len = uri->bv_len - (bv.bv_val - uri->bv_val);
|
||||||
Connection c = *op->o_conn;
|
Connection c = *op->o_conn;
|
||||||
char buf[ SLAP_LDAPDN_MAXLEN ];
|
char buf[ SLAP_LDAPDN_MAXLEN ];
|
||||||
struct berval id,
|
struct berval id,
|
||||||
user = { 0, NULL },
|
user = BER_BVNULL,
|
||||||
realm = { 0, NULL },
|
realm = BER_BVNULL,
|
||||||
mech = { 0, NULL };
|
mech = BER_BVNULL;
|
||||||
|
|
||||||
if ( sizeof( buf ) <= uri->bv_len ) {
|
if ( sizeof( buf ) <= uri->bv_len ) {
|
||||||
return LDAP_INVALID_SYNTAX;
|
return LDAP_INVALID_SYNTAX;
|
||||||
|
|
@ -849,7 +849,7 @@ void slap_sasl2dn( Operation *opx,
|
||||||
slap_callback cb = { NULL, sasl_sc_sasl2dn, NULL, NULL };
|
slap_callback cb = { NULL, sasl_sc_sasl2dn, NULL, NULL };
|
||||||
Operation op = {0};
|
Operation op = {0};
|
||||||
SlapReply rs = {REP_RESULT};
|
SlapReply rs = {REP_RESULT};
|
||||||
struct berval regout = { 0, NULL };
|
struct berval regout = BER_BVNULL;
|
||||||
|
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
LDAP_LOG( TRANSPORT, ENTRY,
|
LDAP_LOG( TRANSPORT, ENTRY,
|
||||||
|
|
|
||||||
|
|
@ -804,7 +804,7 @@ nameUIDPretty(
|
||||||
} else {
|
} else {
|
||||||
int rc;
|
int rc;
|
||||||
struct berval dnval = *val;
|
struct berval dnval = *val;
|
||||||
struct berval uidval = { 0, NULL };
|
struct berval uidval = BER_BVNULL;
|
||||||
|
|
||||||
if( val->bv_val[val->bv_len-1] == 'B'
|
if( val->bv_val[val->bv_len-1] == 'B'
|
||||||
&& val->bv_val[val->bv_len-2] == '\'' )
|
&& val->bv_val[val->bv_len-2] == '\'' )
|
||||||
|
|
@ -875,7 +875,7 @@ uniqueMemberNormalize(
|
||||||
|
|
||||||
ber_dupbv( &out, val );
|
ber_dupbv( &out, val );
|
||||||
if( out.bv_len != 0 ) {
|
if( out.bv_len != 0 ) {
|
||||||
struct berval uid = { 0, NULL };
|
struct berval uid = BER_BVNULL;
|
||||||
|
|
||||||
if( out.bv_val[out.bv_len-1] == 'B'
|
if( out.bv_val[out.bv_len-1] == 'B'
|
||||||
&& out.bv_val[out.bv_len-2] == '\'' )
|
&& out.bv_val[out.bv_len-2] == '\'' )
|
||||||
|
|
@ -935,10 +935,10 @@ uniqueMemberMatch(
|
||||||
{
|
{
|
||||||
int match;
|
int match;
|
||||||
struct berval *asserted = (struct berval *) assertedValue;
|
struct berval *asserted = (struct berval *) assertedValue;
|
||||||
struct berval assertedDN = { 0, NULL };
|
struct berval assertedDN = BER_BVNULL;
|
||||||
struct berval assertedUID = { 0, NULL };
|
struct berval assertedUID = BER_BVNULL;
|
||||||
struct berval valueDN = { 0, NULL };
|
struct berval valueDN = BER_BVNULL;
|
||||||
struct berval valueUID = { 0, NULL };
|
struct berval valueUID = BER_BVNULL;
|
||||||
|
|
||||||
if( asserted->bv_len != 0 ) {
|
if( asserted->bv_len != 0 ) {
|
||||||
assertedDN = *asserted;
|
assertedDN = *asserted;
|
||||||
|
|
@ -1372,7 +1372,7 @@ approxIndexer(
|
||||||
BerVarray keys=NULL;
|
BerVarray keys=NULL;
|
||||||
|
|
||||||
for( j=0; values[j].bv_val != NULL; j++ ) {
|
for( j=0; values[j].bv_val != NULL; j++ ) {
|
||||||
struct berval val = { 0, NULL };
|
struct berval val = BER_BVNULL;
|
||||||
/* Yes, this is necessary */
|
/* Yes, this is necessary */
|
||||||
UTF8bvnormalize( &values[j], &val, LDAP_UTF8_APPROX, NULL );
|
UTF8bvnormalize( &values[j], &val, LDAP_UTF8_APPROX, NULL );
|
||||||
assert( val.bv_val != NULL );
|
assert( val.bv_val != NULL );
|
||||||
|
|
@ -2210,7 +2210,7 @@ certificateExactNormalize(
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
char *serial = NULL;
|
char *serial = NULL;
|
||||||
ber_len_t seriallen;
|
ber_len_t seriallen;
|
||||||
struct berval issuer_dn = { 0, NULL };
|
struct berval issuer_dn = BER_BVNULL;
|
||||||
X509_NAME *name = NULL;
|
X509_NAME *name = NULL;
|
||||||
ASN1_INTEGER *sn = NULL;
|
ASN1_INTEGER *sn = NULL;
|
||||||
X509 *xcert = NULL;
|
X509 *xcert = NULL;
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ do_search(
|
||||||
Operation *op, /* info about the op to which we're responding */
|
Operation *op, /* info about the op to which we're responding */
|
||||||
SlapReply *rs /* all the response data we'll send */
|
SlapReply *rs /* all the response data we'll send */
|
||||||
) {
|
) {
|
||||||
struct berval base = { 0, NULL };
|
struct berval base = BER_BVNULL;
|
||||||
ber_len_t siz, off, i;
|
ber_len_t siz, off, i;
|
||||||
int manageDSAit;
|
int manageDSAit;
|
||||||
int be_manageDSAit;
|
int be_manageDSAit;
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,8 @@ slapadd( int argc, char **argv )
|
||||||
const char *progname = "slapadd";
|
const char *progname = "slapadd";
|
||||||
|
|
||||||
struct berval csn;
|
struct berval csn;
|
||||||
struct berval maxcsn = { 0, NULL };
|
struct berval maxcsn = BER_BVNULL;
|
||||||
struct berval ldifcsn = { 0, NULL };
|
struct berval ldifcsn = BER_BVNULL;
|
||||||
int match;
|
int match;
|
||||||
int provider_subentry = 0;
|
int provider_subentry = 0;
|
||||||
struct subentryinfo *sei;
|
struct subentryinfo *sei;
|
||||||
|
|
@ -75,7 +75,7 @@ slapadd( int argc, char **argv )
|
||||||
Attribute *attr;
|
Attribute *attr;
|
||||||
Entry *ctxcsn_e;
|
Entry *ctxcsn_e;
|
||||||
ID ctxcsn_id;
|
ID ctxcsn_id;
|
||||||
struct berval ctxcsn_ndn = { 0, NULL };
|
struct berval ctxcsn_ndn = BER_BVNULL;
|
||||||
int ret;
|
int ret;
|
||||||
struct berval bvtext;
|
struct berval bvtext;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ slap_tool_init(
|
||||||
{
|
{
|
||||||
char *options;
|
char *options;
|
||||||
char *conffile = SLAPD_DEFAULT_CONFIGFILE;
|
char *conffile = SLAPD_DEFAULT_CONFIGFILE;
|
||||||
struct berval base = { 0, NULL };
|
struct berval base = BER_BVNULL;
|
||||||
char *subtree = NULL;
|
char *subtree = NULL;
|
||||||
char *ldiffile = NULL;
|
char *ldiffile = NULL;
|
||||||
int rc, i, dbnum;
|
int rc, i, dbnum;
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,7 @@ slapi_int_ldapmod_to_entry(
|
||||||
char *ldn,
|
char *ldn,
|
||||||
LDAPMod **mods )
|
LDAPMod **mods )
|
||||||
{
|
{
|
||||||
struct berval dn = { 0, NULL };
|
struct berval dn = BER_BVNULL;
|
||||||
Entry *pEntry=NULL;
|
Entry *pEntry=NULL;
|
||||||
LDAPMod *pMod;
|
LDAPMod *pMod;
|
||||||
struct berval *bv;
|
struct berval *bv;
|
||||||
|
|
@ -516,7 +516,7 @@ slapi_delete_internal(
|
||||||
Slapi_PBlock *pPB = NULL;
|
Slapi_PBlock *pPB = NULL;
|
||||||
Slapi_PBlock *pSavePB = NULL;
|
Slapi_PBlock *pSavePB = NULL;
|
||||||
SlapReply rs = { REP_RESULT };
|
SlapReply rs = { REP_RESULT };
|
||||||
struct berval dn = { 0, NULL };
|
struct berval dn = BER_BVNULL;
|
||||||
|
|
||||||
int manageDsaIt = 0;
|
int manageDsaIt = 0;
|
||||||
int isCritical;
|
int isCritical;
|
||||||
|
|
@ -763,8 +763,8 @@ slapi_modrdn_internal(
|
||||||
int log_change )
|
int log_change )
|
||||||
{
|
{
|
||||||
#ifdef LDAP_SLAPI
|
#ifdef LDAP_SLAPI
|
||||||
struct berval dn = { 0, NULL };
|
struct berval dn = BER_BVNULL;
|
||||||
struct berval newrdn = { 0, NULL };
|
struct berval newrdn = BER_BVNULL;
|
||||||
Connection *pConn = NULL;
|
Connection *pConn = NULL;
|
||||||
Operation *op = NULL;
|
Operation *op = NULL;
|
||||||
Slapi_PBlock *pPB = NULL;
|
Slapi_PBlock *pPB = NULL;
|
||||||
|
|
@ -893,7 +893,7 @@ slapi_modify_internal(
|
||||||
Slapi_PBlock *pPB = NULL;
|
Slapi_PBlock *pPB = NULL;
|
||||||
Slapi_PBlock *pSavePB = NULL;
|
Slapi_PBlock *pSavePB = NULL;
|
||||||
|
|
||||||
struct berval dn = { 0, NULL };
|
struct berval dn = BER_BVNULL;
|
||||||
|
|
||||||
int manageDsaIt = 0;
|
int manageDsaIt = 0;
|
||||||
int isCritical;
|
int isCritical;
|
||||||
|
|
@ -1088,9 +1088,9 @@ slapi_search_internal(
|
||||||
Operation *op = NULL;
|
Operation *op = NULL;
|
||||||
Slapi_PBlock *ptr = NULL;
|
Slapi_PBlock *ptr = NULL;
|
||||||
Slapi_PBlock *pSavePB = NULL;
|
Slapi_PBlock *pSavePB = NULL;
|
||||||
struct berval dn = { 0, NULL };
|
struct berval dn = BER_BVNULL;
|
||||||
Filter *filter=NULL;
|
Filter *filter=NULL;
|
||||||
struct berval fstr = { 0, NULL };
|
struct berval fstr = BER_BVNULL;
|
||||||
AttributeName *an = NULL;
|
AttributeName *an = NULL;
|
||||||
const char *text = NULL;
|
const char *text = NULL;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ slapi_entry_set_dn(
|
||||||
char *ldn )
|
char *ldn )
|
||||||
{
|
{
|
||||||
#ifdef LDAP_SLAPI
|
#ifdef LDAP_SLAPI
|
||||||
struct berval dn = { 0, NULL };
|
struct berval dn = BER_BVNULL;
|
||||||
|
|
||||||
dn.bv_val = ldn;
|
dn.bv_val = ldn;
|
||||||
dn.bv_len = strlen( ldn );
|
dn.bv_len = strlen( ldn );
|
||||||
|
|
|
||||||
|
|
@ -343,7 +343,7 @@ do_syncrep1(
|
||||||
sc = NULL;
|
sc = NULL;
|
||||||
} else {
|
} else {
|
||||||
/* stored cookie */
|
/* stored cookie */
|
||||||
struct berval newcookie = { 0, NULL };
|
struct berval newcookie = BER_BVNULL;
|
||||||
ber_dupbv( &cookie_bv, &cookie[0] );
|
ber_dupbv( &cookie_bv, &cookie[0] );
|
||||||
ber_bvarray_add( &si->si_syncCookie.octet_str, &cookie_bv );
|
ber_bvarray_add( &si->si_syncCookie.octet_str, &cookie_bv );
|
||||||
slap_parse_sync_cookie( &si->si_syncCookie );
|
slap_parse_sync_cookie( &si->si_syncCookie );
|
||||||
|
|
@ -434,10 +434,10 @@ do_syncrep2(
|
||||||
Entry *entry = NULL;
|
Entry *entry = NULL;
|
||||||
|
|
||||||
int syncstate;
|
int syncstate;
|
||||||
struct berval syncUUID = { 0, NULL };
|
struct berval syncUUID = BER_BVNULL;
|
||||||
struct sync_cookie syncCookie = { NULL, -1, NULL };
|
struct sync_cookie syncCookie = { NULL, -1, NULL };
|
||||||
struct sync_cookie syncCookie_req = { NULL, -1, NULL };
|
struct sync_cookie syncCookie_req = { NULL, -1, NULL };
|
||||||
struct berval cookie = { 0, NULL };
|
struct berval cookie = BER_BVNULL;
|
||||||
|
|
||||||
int rc, err, i;
|
int rc, err, i;
|
||||||
ber_len_t len;
|
ber_len_t len;
|
||||||
|
|
@ -1042,8 +1042,8 @@ syncrepl_entry(
|
||||||
Backend *be = op->o_bd;
|
Backend *be = op->o_bd;
|
||||||
slap_callback cb = { NULL };
|
slap_callback cb = { NULL };
|
||||||
struct berval *syncuuid_bv = NULL;
|
struct berval *syncuuid_bv = NULL;
|
||||||
struct berval syncUUID_strrep = { 0, NULL };
|
struct berval syncUUID_strrep = BER_BVNULL;
|
||||||
struct berval uuid_bv = { 0, NULL };
|
struct berval uuid_bv = BER_BVNULL;
|
||||||
|
|
||||||
SlapReply rs = {REP_RESULT};
|
SlapReply rs = {REP_RESULT};
|
||||||
Filter f = {0};
|
Filter f = {0};
|
||||||
|
|
@ -1052,11 +1052,11 @@ syncrepl_entry(
|
||||||
int ret = LDAP_SUCCESS;
|
int ret = LDAP_SUCCESS;
|
||||||
const char *text;
|
const char *text;
|
||||||
|
|
||||||
struct berval pdn = { 0, NULL };
|
struct berval pdn = BER_BVNULL;
|
||||||
struct berval org_req_dn = { 0, NULL };
|
struct berval org_req_dn = BER_BVNULL;
|
||||||
struct berval org_req_ndn = { 0, NULL };
|
struct berval org_req_ndn = BER_BVNULL;
|
||||||
struct berval org_dn = { 0, NULL };
|
struct berval org_dn = BER_BVNULL;
|
||||||
struct berval org_ndn = { 0, NULL };
|
struct berval org_ndn = BER_BVNULL;
|
||||||
int org_managedsait;
|
int org_managedsait;
|
||||||
|
|
||||||
if (( syncstate == LDAP_SYNC_PRESENT || syncstate == LDAP_SYNC_ADD ))
|
if (( syncstate == LDAP_SYNC_PRESENT || syncstate == LDAP_SYNC_ADD ))
|
||||||
|
|
@ -1305,11 +1305,11 @@ syncrepl_del_nonpresent(
|
||||||
Modifications **modtail = &modlist;
|
Modifications **modtail = &modlist;
|
||||||
Attribute *attr;
|
Attribute *attr;
|
||||||
|
|
||||||
struct berval pdn = { 0, NULL };
|
struct berval pdn = BER_BVNULL;
|
||||||
struct berval org_req_dn = { 0, NULL };
|
struct berval org_req_dn = BER_BVNULL;
|
||||||
struct berval org_req_ndn = { 0, NULL };
|
struct berval org_req_ndn = BER_BVNULL;
|
||||||
struct berval org_dn = { 0, NULL };
|
struct berval org_dn = BER_BVNULL;
|
||||||
struct berval org_ndn = { 0, NULL };
|
struct berval org_ndn = BER_BVNULL;
|
||||||
int org_managedsait;
|
int org_managedsait;
|
||||||
|
|
||||||
op->o_req_dn = si->si_base;
|
op->o_req_dn = si->si_base;
|
||||||
|
|
|
||||||
|
|
@ -217,8 +217,8 @@ value_match(
|
||||||
const char ** text )
|
const char ** text )
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
struct berval nv1 = { 0, NULL };
|
struct berval nv1 = BER_BVNULL;
|
||||||
struct berval nv2 = { 0, NULL };
|
struct berval nv2 = BER_BVNULL;
|
||||||
|
|
||||||
assert( mr != NULL );
|
assert( mr != NULL );
|
||||||
|
|
||||||
|
|
@ -246,7 +246,7 @@ int value_find_ex(
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int rc;
|
int rc;
|
||||||
struct berval nval = { 0, NULL };
|
struct berval nval = BER_BVNULL;
|
||||||
MatchingRule *mr = ad->ad_type->sat_equality;
|
MatchingRule *mr = ad->ad_type->sat_equality;
|
||||||
|
|
||||||
if( mr == NULL || !mr->smr_match ) {
|
if( mr == NULL || !mr->smr_match ) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue