if ( b->a_group_pat.bv_len ) {
struct berval bv;
- struct berval ndn = { 0, NULL };
+ struct berval ndn = BER_BVNULL;
int rc;
if ( op->o_ndn.bv_len == 0 ) {
int setref
)
{
- struct berval set = { 0, NULL };
+ struct berval set = BER_BVNULL;
int rc = 0;
AciSetCookie cookie;
if (setref == 0) {
ber_dupbv_x( &set, subj, op->o_tmpmemctx );
} else {
- struct berval subjdn, ndn = { 0, NULL };
+ struct berval subjdn, ndn = BER_BVNULL;
struct berval setat;
BerVarray bvals;
const char *text;
}
if ( a->acl_filter != NULL ) {
- struct berval bv = { 0, NULL };
+ struct berval bv = BER_BVNULL;
to++;
filter2bv( a->acl_filter, &bv );
fprintf( stderr, " filter=%s\n", bv.bv_val );
{
BerElement *ber = op->o_ber;
char *last;
- struct berval dn = { 0, NULL };
+ struct berval dn = BER_BVNULL;
ber_len_t len;
ber_tag_t tag;
Entry *e;
)
{
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;
DB_LOCK ctxcsn_lock;
struct berval max_committed_csn;
{ 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_realloc(void *, size_t);
Entry *e = NULL, base;
Entry *matched = NULL;
EntryInfo *ei;
- struct berval realbase = { 0, NULL };
+ struct berval realbase = BER_BVNULL;
int manageDSAit;
int tentries = 0;
ID lastid = NOID;
}
if ( e == NULL ) {
- struct berval matched_dn = { 0, NULL };
+ struct berval matched_dn = BER_BVNULL;
if ( matched != NULL ) {
BerVarray erefs;
LDAPControl ctrl, *ctrls[2];
BerElementBuffer berbuf;
BerElement *ber = (BerElement *)&berbuf;
- struct berval cookie = { 0, NULL };
+ struct berval cookie = BER_BVNULL;
PagedResultsCookie respcookie;
#ifdef NEW_LOGGING
char *hostlist = NULL;
char **hosts = NULL;
char *refdn;
- struct berval nrefdn = { 0, NULL };
+ struct berval nrefdn = BER_BVNULL;
BerVarray urls = NULL;
int manageDSAit;
Attribute *a;
LDAPMod **attrs;
struct berval mapped;
- struct berval mdn = { 0, NULL };
+ struct berval mdn = BER_BVNULL;
ber_int_t msgid;
dncookie dc;
int isupdate;
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
struct ldapconn *lc;
- struct berval mdn = { 0, NULL };
+ struct berval mdn = BER_BVNULL;
int rc = 0;
ber_int_t msgid;
dncookie dc;
{
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
struct ldapconn *lc;
- struct berval mapped_at = { 0, NULL }, mapped_val = { 0, NULL };
- struct berval mdn = { 0, NULL };
+ struct berval mapped_at = BER_BVNULL, mapped_val = BER_BVNULL;
+ struct berval mdn = BER_BVNULL;
ber_int_t msgid;
int freeval = 0;
dncookie dc;
int rc = LDAP_SUCCESS;
#endif /* LDAP_BACK_PROXY_AUTHZ */
- struct berval mdn = { 0, NULL };
+ struct berval mdn = BER_BVNULL;
lc = ldap_back_getconn( op, rs );
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
struct ldapconn *lc;
req_pwdexop_s *qpw = &op->oq_pwdexop;
- struct berval mdn = { 0, NULL }, newpw;
+ struct berval mdn = BER_BVNULL, newpw;
LDAPMessage *res;
ber_int_t msgid;
int rc, isproxy;
Modifications *ml;
int i, j, rc;
struct berval mapped;
- struct berval mdn = { 0, NULL };
+ struct berval mdn = BER_BVNULL;
ber_int_t msgid;
dncookie dc;
int isupdate;
int rc = LDAP_SUCCESS;
#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 );
if ( !lc || !ldap_back_dobind(lc, op, rs) ) {
#define LDAP_BUILD_ENTRY_PRIVATE 0x01
#define LDAP_BUILD_ENTRY_NORMALIZE 0x02
-static struct berval dummy = { 0, NULL };
+static struct berval dummy = BER_BVNULL;
int
ldap_back_search(
struct timeval tv;
LDAPMessage *res, *e;
int rc = 0, msgid;
- struct berval match = { 0, NULL };
+ struct berval match = BER_BVNULL;
char **mapped_attrs = NULL;
struct berval mbase;
- struct berval mfilter = { 0, NULL };
+ struct berval mfilter = BER_BVNULL;
int dontfreetext = 0;
dncookie dc;
#ifdef LDAP_BACK_PROXY_AUTHZ
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
struct ldapconn *lc;
int rc = 1, is_oc;
- struct berval mapped = { 0, NULL }, bdn, mdn;
+ struct berval mapped = BER_BVNULL, bdn, mdn;
LDAPMessage *result = NULL, *e = NULL;
char *gattr[3];
char *filter = NULL;
AttributeDescription *entry = slap_schema.si_ad_entry;
struct ldbminfo *li = (struct ldbminfo *) op->o_bd->be_private;
struct berval p_dn, p_ndn;
- struct berval new_dn = { 0, NULL}, new_ndn = { 0, NULL };
- struct berval old_ndn = { 0, NULL };
+ struct berval new_dn = BER_BVNULL, new_ndn = BER_BVNULL;
+ struct berval old_ndn = BER_BVNULL;
Entry *e, *p = NULL;
Entry *matched;
/* LDAP v2 supporting correct attribute handling. */
ID id, cursor;
Entry *e;
Entry *matched = NULL;
- struct berval realbase = { 0, NULL };
+ struct berval realbase = BER_BVNULL;
int manageDSAit = get_manageDSAit( op );
#ifdef NEW_LOGGING
}
if ( e == NULL ) {
- struct berval matched_dn = { 0, NULL };
+ struct berval matched_dn = BER_BVNULL;
if ( matched != NULL ) {
BerVarray erefs;
int i, candidate = -1;
Attribute *a;
LDAPMod **attrs;
- struct berval mdn = { 0, NULL }, mapped;
+ struct berval mdn = BER_BVNULL, mapped;
dncookie dc;
#ifdef NEW_LOGGING
)
{
struct metainfo *li = ( struct metainfo * )op->o_bd->be_private;
- struct berval mdn = { 0, NULL };
+ struct berval mdn = BER_BVNULL;
ber_int_t msgid;
dncookie dc;
struct metasingleconn *lsc = &lc->conns[ candidate ];
struct metaconn *lc;
struct metasingleconn *lsc;
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 cres = LDAP_SUCCESS, rres = LDAP_SUCCESS;
int *msgid;
dc.ctx = "compareDN";
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_value = op->oq_compare.rs_ava->aa_value;
struct metainfo *li = ( struct metainfo * )op->o_bd->be_private;
struct metaconn *lc;
int candidate = -1;
- struct berval mdn = { 0, NULL };
+ struct berval mdn = BER_BVNULL;
dncookie dc;
lc = meta_back_getconn( op, rs, META_OP_REQUIRE_SINGLE,
char *gattr[ 2 ];
char *filter = NULL, *ptr;
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;
if ( group_oc->soc_names && group_oc->soc_names[ 0 ] ) {
LDAPMod *mods = NULL;
Modifications *ml;
int candidate = -1, i;
- struct berval mdn = { 0, NULL };
+ struct berval mdn = BER_BVNULL;
struct berval mapped;
dncookie dc;
struct metaconn *lc;
int rc = 0;
int candidate = -1;
- struct berval mdn = { 0, NULL },
- mnewSuperior = { 0, NULL };
+ struct berval mdn = BER_BVNULL,
+ mnewSuperior = BER_BVNULL;
dncookie dc;
lc = meta_back_getconn( op, rs, META_OP_REQUIRE_SINGLE,
LDAPMessage *res = NULL, *e;
int rc = 0, *msgid, sres = LDAP_SUCCESS;
char *err = NULL;
- struct berval match = { 0, NULL }, mmatch = { 0, NULL };
+ struct berval match = BER_BVNULL, mmatch = BER_BVNULL;
BerVarray v2refs = NULL;
int i, last = 0, candidates = 0, initial_candidates = 0,
struct berval realbase = op->o_req_dn;
int realscope = op->ors_scope;
ber_len_t suffixlen = 0;
- struct berval mbase = { 0, NULL };
- struct berval mfilter = { 0, NULL };
+ struct berval mbase = BER_BVNULL;
+ struct berval mfilter = BER_BVNULL;
char **mapped_attrs = NULL;
if ( lsc->candidate != META_CANDIDATE ) {
Entry ent = {0};
BerElement ber = *e->lm_ber;
Attribute *attr, **attrp;
- struct berval dummy = { 0, NULL };
+ struct berval dummy = BER_BVNULL;
struct berval *bv, bdn;
const char *text;
dncookie dc;
struct berval s;
struct berval n;
} int_2_level[] = {
- { LDAP_DEBUG_TRACE, BER_BVC("Trace"), { 0, NULL } },
- { LDAP_DEBUG_PACKETS, BER_BVC("Packets"), { 0, NULL } },
- { LDAP_DEBUG_ARGS, BER_BVC("Args"), { 0, NULL } },
- { LDAP_DEBUG_CONNS, BER_BVC("Conns"), { 0, NULL } },
- { LDAP_DEBUG_BER, BER_BVC("BER"), { 0, NULL } },
- { LDAP_DEBUG_FILTER, BER_BVC("Filter"), { 0, NULL } },
- { LDAP_DEBUG_CONFIG, BER_BVC("Config"), { 0, NULL } }, /* useless */
- { LDAP_DEBUG_ACL, BER_BVC("ACL"), { 0, NULL } },
- { LDAP_DEBUG_STATS, BER_BVC("Stats"), { 0, NULL } },
- { LDAP_DEBUG_STATS2, BER_BVC("Stats2"), { 0, NULL } },
- { LDAP_DEBUG_SHELL, BER_BVC("Shell"), { 0, NULL } },
- { LDAP_DEBUG_PARSE, BER_BVC("Parse"), { 0, NULL } },
- { LDAP_DEBUG_CACHE, BER_BVC("Cache"), { 0, NULL } },
- { LDAP_DEBUG_INDEX, BER_BVC("Index"), { 0, NULL } },
- { 0, { 0, NULL }, { 0, NULL } }
+ { LDAP_DEBUG_TRACE, BER_BVC("Trace"), BER_BVNULL },
+ { LDAP_DEBUG_PACKETS, BER_BVC("Packets"), BER_BVNULL },
+ { LDAP_DEBUG_ARGS, BER_BVC("Args"), BER_BVNULL },
+ { LDAP_DEBUG_CONNS, BER_BVC("Conns"), BER_BVNULL },
+ { LDAP_DEBUG_BER, BER_BVC("BER"), BER_BVNULL },
+ { LDAP_DEBUG_FILTER, BER_BVC("Filter"), BER_BVNULL },
+ { LDAP_DEBUG_CONFIG, BER_BVC("Config"), BER_BVNULL }, /* useless */
+ { LDAP_DEBUG_ACL, BER_BVC("ACL"), BER_BVNULL },
+ { LDAP_DEBUG_STATS, BER_BVC("Stats"), BER_BVNULL },
+ { LDAP_DEBUG_STATS2, BER_BVC("Stats2"), BER_BVNULL },
+ { LDAP_DEBUG_SHELL, BER_BVC("Shell"), BER_BVNULL },
+ { LDAP_DEBUG_PARSE, BER_BVC("Parse"), BER_BVNULL },
+ { LDAP_DEBUG_CACHE, BER_BVC("Cache"), BER_BVNULL },
+ { LDAP_DEBUG_INDEX, BER_BVC("Index"), BER_BVNULL },
+ { 0, BER_BVNULL, BER_BVNULL }
};
static int loglevel2int( struct berval *l );
struct berval desc[] = {
BER_BVC("This entry allows to set the log level runtime."),
BER_BVC("Set the attribute 'managedInfo' to the desired log levels."),
- { 0, NULL }
+ BER_BVNULL
};
ldap_pvt_thread_mutex_init( &monitor_log_mutex );
BER_BVC( "Search" ),
BER_BVC( "Abandon" ),
BER_BVC( "Extended" ),
- { 0, NULL }
+ BER_BVNULL
};
int
time_t stoptime;
LDAPRDN rdn = NULL;
- struct berval parent = { 0, NULL };
+ struct berval parent = BER_BVNULL;
AttributeDescription *ad_objectClass = slap_schema.si_ad_objectClass;
BerElement *ber = op->o_ber;
ber_int_t version;
ber_tag_t method;
- struct berval mech = { 0, NULL };
- struct berval dn = { 0, NULL };
+ struct berval mech = BER_BVNULL;
+ struct berval dn = BER_BVNULL;
ber_tag_t tag;
Backend *be = NULL;
)
{
Entry *entry = NULL;
- struct berval dn = { 0, NULL };
- struct berval desc = { 0, NULL };
- struct berval value = { 0, NULL };
- AttributeAssertion ava = { NULL, { 0, NULL } };
+ struct berval dn = BER_BVNULL;
+ struct berval desc = BER_BVNULL;
+ struct berval value = BER_BVNULL;
+ AttributeAssertion ava = { NULL, BER_BVNULL };
int manageDSAit;
ava.aa_desc = NULL;
char **default_passwd_hash = NULL;
int cargc = 0, cargv_size = 0;
char **cargv;
-struct berval default_search_base = { 0, NULL };
-struct berval default_search_nbase = { 0, NULL };
+struct berval default_search_base = BER_BVNULL;
+struct berval default_search_nbase = BER_BVNULL;
unsigned num_subordinates = 0;
-struct berval global_schemadn = { 0, NULL };
-struct berval global_schemandn = { 0, NULL };
+struct berval global_schemadn = BER_BVNULL;
+struct berval global_schemandn = BER_BVNULL;
ber_len_t sockbuf_max_incoming = SLAP_SB_MAX_INCOMING_DEFAULT;
ber_len_t sockbuf_max_incoming_auth= SLAP_SB_MAX_INCOMING_AUTH;
} else if ( rc == 0 ) {
void *ssl;
- struct berval authid = { 0, NULL };
+ struct berval authid = BER_BVNULL;
c->c_needs_tls_accept = 0;
LDAPControl *ctrl )
{
int rc;
- struct berval dn = { 0, NULL };
+ struct berval dn = BER_BVNULL;
if ( op->o_proxy_authz != SLAP_NO_CONTROL ) {
rs->sr_text = "proxy authorization control specified multiple times";
ber_tag_t tag;
ber_int_t size;
BerElement *ber;
- struct berval cookie = { 0, NULL };
+ struct berval cookie = BER_BVNULL;
if ( op->o_pagedresults != SLAP_NO_CONTROL ) {
rs->sr_text = "paged results control specified multiple times";
LDAPControl *ctrl )
{
BerElement *ber;
- struct berval fstr = { 0, NULL };
+ struct berval fstr = BER_BVNULL;
const char *err_msg = "";
if ( op->o_assert != SLAP_NO_CONTROL ) {
LDAPControl *ctrl )
{
BerElement *ber;
- struct berval fstr = { 0, NULL };
+ struct berval fstr = BER_BVNULL;
const char *err_msg = "";
if ( op->o_valuesreturnfilter != SLAP_NO_CONTROL ) {
socklen_t len = sizeof(from);
long id;
slap_ssf_t ssf = 0;
- struct berval authid = { 0, NULL };
+ struct berval authid = BER_BVNULL;
#ifdef SLAPD_RLOOKUPS
char hbuf[NI_MAXHOST];
#endif
SlapReply *rs
)
{
- struct berval dn = { 0, NULL };
- struct berval pdn = { 0, NULL };
- struct berval org_req_dn = { 0, NULL };
- struct berval org_req_ndn = { 0, NULL };
- struct berval org_dn = { 0, NULL };
- struct berval org_ndn = { 0, NULL };
+ struct berval dn = BER_BVNULL;
+ struct berval pdn = BER_BVNULL;
+ struct berval org_req_dn = BER_BVNULL;
+ struct berval org_req_ndn = BER_BVNULL;
+ struct berval org_dn = BER_BVNULL;
+ struct berval org_ndn = BER_BVNULL;
int org_managedsait;
int manageDSAit;
slap_mr_normalize_func *normf = NULL;
slap_syntax_transform_func *transf = NULL;
MatchingRule *mr = NULL;
- struct berval bv = { 0, NULL };
+ struct berval bv = BER_BVNULL;
int do_sort = 0;
assert( ava );
BerElementBuffer 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_set_option( ber, LBER_OPT_BER_MEMCTX, &op->o_tmpmemctx );
BerElementBuffer 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_set_option( ber, LBER_OPT_BER_MEMCTX, &op->o_tmpmemctx );
)
{
char csnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE + 4 ];
- struct berval octet_str = { 0, NULL };
- struct berval ctxcsn = { 0, NULL };
- struct berval ctxcsn_dup = { 0, NULL };
+ struct berval octet_str = BER_BVNULL;
+ struct berval ctxcsn = BER_BVNULL;
+ struct berval ctxcsn_dup = BER_BVNULL;
struct berval slap_syncCookie;
if ( cookie == NULL )
int ret;
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 ) {
AttributeDescription *desc = a->a_desc;
char *serverName;
int serverMode = SLAP_SERVER_MODE;
- struct berval cookie = { 0, NULL };
+ struct berval cookie = BER_BVNULL;
struct sync_cookie *scp = NULL;
struct sync_cookie *scp_entry = NULL;
Operation *op,
SlapReply *rs )
{
- struct berval dn = { 0, NULL };
+ struct berval dn = BER_BVNULL;
char *last;
ber_tag_t tag;
ber_len_t len;
SlapReply *rs
)
{
- struct berval dn = { 0, NULL };
- struct berval newrdn = { 0, NULL };
- struct berval newSuperior = { 0, NULL };
+ struct berval dn = BER_BVNULL;
+ struct berval newrdn = BER_BVNULL;
+ struct berval newSuperior = BER_BVNULL;
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;
ber_len_t length;
int manageDSAit;
- struct berval pdn = { 0, NULL };
- struct berval org_req_dn = { 0, NULL };
- struct berval org_req_ndn = { 0, NULL };
- struct berval org_dn = { 0, NULL };
- struct berval org_ndn = { 0, NULL };
+ struct berval pdn = BER_BVNULL;
+ struct berval org_req_dn = BER_BVNULL;
+ struct berval org_req_ndn = BER_BVNULL;
+ struct berval org_dn = BER_BVNULL;
+ struct berval org_ndn = BER_BVNULL;
int org_managedsait;
#ifdef NEW_LOGGING
int rc;
ber_tag_t tag, rtag;
ber_len_t length;
- struct berval type = { 0, NULL };
- struct berval value = { 0, NULL };
- struct berval rule_text = { 0, NULL };
+ struct berval type = BER_BVNULL;
+ struct berval value = BER_BVNULL;
+ struct berval rule_text = BER_BVNULL;
MatchingRuleAssertion ma;
memset( &ma, 0, sizeof ma);
int scope_stored,
int scope_incoming )
{
- struct berval pdn_incoming = { 0, NULL };
+ struct berval pdn_incoming = BER_BVNULL;
if (scope_stored < scope_incoming)
return 0;
pw_hist *tl = NULL, *p;
int zapReset, send_ctrl = 0;
Entry *e;
- struct berval newpw = { 0, NULL }, oldpw = { 0, NULL },
+ struct berval newpw = BER_BVNULL, oldpw = BER_BVNULL,
*bv, cr[2];
LDAPPasswordPolicyError pErr = PP_noError;
struct ldaprwmap *rwmap =
(struct ldaprwmap *)on->on_bi.bi_private;
- struct berval dn, ndn, mdn = { 0, NULL };
+ struct berval dn, ndn, mdn = BER_BVNULL;
int rc = 0;
dncookie dc;
(struct ldaprwmap *)on->on_bi.bi_private;
int rc;
- struct berval mapped_at = { 0, NULL },
- mapped_vals[2] = { { 0, NULL }, { 0, NULL } };
+ struct berval mapped_at = BER_BVNULL,
+ mapped_vals[2] = { BER_BVNULL, BER_BVNULL };
#ifdef ENABLE_REWRITE
rc = rwm_op_dn_massage( op, rs, "compareDn" );
(struct ldaprwmap *)on->on_bi.bi_private;
Entry *e = NULL;
- struct berval dn = { 0, NULL }, ndn = { 0, NULL };
+ struct berval dn = BER_BVNULL, ndn = BER_BVNULL;
dncookie dc;
int rc = SLAP_CB_CONTINUE;
{
int rc;
struct berval bvin;
- struct berval nrefDN = { 0, NULL };
- struct berval nbaseDN = { 0, NULL };
- struct berval ntargetDN = { 0, NULL };
+ struct berval nrefDN = BER_BVNULL;
+ struct berval nbaseDN = BER_BVNULL;
+ struct berval ntargetDN = BER_BVNULL;
if( !baseDN ) {
/* no base, return target */
int
slap_sasl_setpass( Operation *op, SlapReply *rs )
{
- struct berval id = { 0, NULL }; /* needs to come from connection */
- struct berval new = { 0, NULL };
- struct berval old = { 0, NULL };
+ struct berval id = BER_BVNULL; /* needs to come from connection */
+ struct berval new = BER_BVNULL;
+ struct berval old = BER_BVNULL;
assert( ber_bvcmp( &slap_EXOP_MODIFY_PASSWD, &op->ore_reqoid ) == 0 );
/* Username strings */
if( is_dn == SET_U ) {
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;
Connection c = *op->o_conn;
char buf[ SLAP_LDAPDN_MAXLEN ];
struct berval id,
- user = { 0, NULL },
- realm = { 0, NULL },
- mech = { 0, NULL };
+ user = BER_BVNULL,
+ realm = BER_BVNULL,
+ mech = BER_BVNULL;
if ( sizeof( buf ) <= uri->bv_len ) {
return LDAP_INVALID_SYNTAX;
slap_callback cb = { NULL, sasl_sc_sasl2dn, NULL, NULL };
Operation op = {0};
SlapReply rs = {REP_RESULT};
- struct berval regout = { 0, NULL };
+ struct berval regout = BER_BVNULL;
#ifdef NEW_LOGGING
LDAP_LOG( TRANSPORT, ENTRY,
} else {
int rc;
struct berval dnval = *val;
- struct berval uidval = { 0, NULL };
+ struct berval uidval = BER_BVNULL;
if( val->bv_val[val->bv_len-1] == 'B'
&& val->bv_val[val->bv_len-2] == '\'' )
ber_dupbv( &out, val );
if( out.bv_len != 0 ) {
- struct berval uid = { 0, NULL };
+ struct berval uid = BER_BVNULL;
if( out.bv_val[out.bv_len-1] == 'B'
&& out.bv_val[out.bv_len-2] == '\'' )
{
int match;
struct berval *asserted = (struct berval *) assertedValue;
- struct berval assertedDN = { 0, NULL };
- struct berval assertedUID = { 0, NULL };
- struct berval valueDN = { 0, NULL };
- struct berval valueUID = { 0, NULL };
+ struct berval assertedDN = BER_BVNULL;
+ struct berval assertedUID = BER_BVNULL;
+ struct berval valueDN = BER_BVNULL;
+ struct berval valueUID = BER_BVNULL;
if( asserted->bv_len != 0 ) {
assertedDN = *asserted;
BerVarray keys=NULL;
for( j=0; values[j].bv_val != NULL; j++ ) {
- struct berval val = { 0, NULL };
+ struct berval val = BER_BVNULL;
/* Yes, this is necessary */
UTF8bvnormalize( &values[j], &val, LDAP_UTF8_APPROX, NULL );
assert( val.bv_val != NULL );
unsigned char *p;
char *serial = NULL;
ber_len_t seriallen;
- struct berval issuer_dn = { 0, NULL };
+ struct berval issuer_dn = BER_BVNULL;
X509_NAME *name = NULL;
ASN1_INTEGER *sn = NULL;
X509 *xcert = NULL;
Operation *op, /* info about the op to which we're responding */
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;
int manageDSAit;
int be_manageDSAit;
const char *progname = "slapadd";
struct berval csn;
- struct berval maxcsn = { 0, NULL };
- struct berval ldifcsn = { 0, NULL };
+ struct berval maxcsn = BER_BVNULL;
+ struct berval ldifcsn = BER_BVNULL;
int match;
int provider_subentry = 0;
struct subentryinfo *sei;
Attribute *attr;
Entry *ctxcsn_e;
ID ctxcsn_id;
- struct berval ctxcsn_ndn = { 0, NULL };
+ struct berval ctxcsn_ndn = BER_BVNULL;
int ret;
struct berval bvtext;
int i;
{
char *options;
char *conffile = SLAPD_DEFAULT_CONFIGFILE;
- struct berval base = { 0, NULL };
+ struct berval base = BER_BVNULL;
char *subtree = NULL;
char *ldiffile = NULL;
int rc, i, dbnum;
char *ldn,
LDAPMod **mods )
{
- struct berval dn = { 0, NULL };
+ struct berval dn = BER_BVNULL;
Entry *pEntry=NULL;
LDAPMod *pMod;
struct berval *bv;
Slapi_PBlock *pPB = NULL;
Slapi_PBlock *pSavePB = NULL;
SlapReply rs = { REP_RESULT };
- struct berval dn = { 0, NULL };
+ struct berval dn = BER_BVNULL;
int manageDsaIt = 0;
int isCritical;
int log_change )
{
#ifdef LDAP_SLAPI
- struct berval dn = { 0, NULL };
- struct berval newrdn = { 0, NULL };
+ struct berval dn = BER_BVNULL;
+ struct berval newrdn = BER_BVNULL;
Connection *pConn = NULL;
Operation *op = NULL;
Slapi_PBlock *pPB = NULL;
Slapi_PBlock *pPB = NULL;
Slapi_PBlock *pSavePB = NULL;
- struct berval dn = { 0, NULL };
+ struct berval dn = BER_BVNULL;
int manageDsaIt = 0;
int isCritical;
Operation *op = NULL;
Slapi_PBlock *ptr = NULL;
Slapi_PBlock *pSavePB = NULL;
- struct berval dn = { 0, NULL };
+ struct berval dn = BER_BVNULL;
Filter *filter=NULL;
- struct berval fstr = { 0, NULL };
+ struct berval fstr = BER_BVNULL;
AttributeName *an = NULL;
const char *text = NULL;
char *ldn )
{
#ifdef LDAP_SLAPI
- struct berval dn = { 0, NULL };
+ struct berval dn = BER_BVNULL;
dn.bv_val = ldn;
dn.bv_len = strlen( ldn );
sc = NULL;
} else {
/* stored cookie */
- struct berval newcookie = { 0, NULL };
+ struct berval newcookie = BER_BVNULL;
ber_dupbv( &cookie_bv, &cookie[0] );
ber_bvarray_add( &si->si_syncCookie.octet_str, &cookie_bv );
slap_parse_sync_cookie( &si->si_syncCookie );
Entry *entry = NULL;
int syncstate;
- struct berval syncUUID = { 0, NULL };
+ struct berval syncUUID = BER_BVNULL;
struct sync_cookie syncCookie = { 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;
ber_len_t len;
Backend *be = op->o_bd;
slap_callback cb = { NULL };
struct berval *syncuuid_bv = NULL;
- struct berval syncUUID_strrep = { 0, NULL };
- struct berval uuid_bv = { 0, NULL };
+ struct berval syncUUID_strrep = BER_BVNULL;
+ struct berval uuid_bv = BER_BVNULL;
SlapReply rs = {REP_RESULT};
Filter f = {0};
int ret = LDAP_SUCCESS;
const char *text;
- struct berval pdn = { 0, NULL };
- struct berval org_req_dn = { 0, NULL };
- struct berval org_req_ndn = { 0, NULL };
- struct berval org_dn = { 0, NULL };
- struct berval org_ndn = { 0, NULL };
+ struct berval pdn = BER_BVNULL;
+ struct berval org_req_dn = BER_BVNULL;
+ struct berval org_req_ndn = BER_BVNULL;
+ struct berval org_dn = BER_BVNULL;
+ struct berval org_ndn = BER_BVNULL;
int org_managedsait;
if (( syncstate == LDAP_SYNC_PRESENT || syncstate == LDAP_SYNC_ADD ))
Modifications **modtail = &modlist;
Attribute *attr;
- struct berval pdn = { 0, NULL };
- struct berval org_req_dn = { 0, NULL };
- struct berval org_req_ndn = { 0, NULL };
- struct berval org_dn = { 0, NULL };
- struct berval org_ndn = { 0, NULL };
+ struct berval pdn = BER_BVNULL;
+ struct berval org_req_dn = BER_BVNULL;
+ struct berval org_req_ndn = BER_BVNULL;
+ struct berval org_dn = BER_BVNULL;
+ struct berval org_ndn = BER_BVNULL;
int org_managedsait;
op->o_req_dn = si->si_base;
const char ** text )
{
int rc;
- struct berval nv1 = { 0, NULL };
- struct berval nv2 = { 0, NULL };
+ struct berval nv1 = BER_BVNULL;
+ struct berval nv2 = BER_BVNULL;
assert( mr != NULL );
{
int i;
int rc;
- struct berval nval = { 0, NULL };
+ struct berval nval = BER_BVNULL;
MatchingRule *mr = ad->ad_type->sat_equality;
if( mr == NULL || !mr->smr_match ) {