From: Jong Hyuk Choi Date: Fri, 27 Jun 2003 20:29:32 +0000 (+0000) Subject: ITS#2618 fix X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~850 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7087a8f58d4e6239b88d1dc5e56bf06e77572351;p=openldap ITS#2618 fix --- diff --git a/servers/slapd/add.c b/servers/slapd/add.c index 2a4651abf5..92e7a86804 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -328,7 +328,7 @@ do_add( Operation *op, SlapReply *rs ) #ifdef LDAP_SYNCREPL if ( op->o_bd->syncinfo ) { - defref = op->o_bd->syncinfo->masteruri; + defref = op->o_bd->syncinfo->masteruri_bv; } else #endif { diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 178af28e6d..8affc8270a 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -2854,6 +2854,10 @@ parse_syncrepl_line( sizeof( PROVIDERSTR ) - 1 )) { val = cargv[ i ] + sizeof( PROVIDERSTR ); si->masteruri = ch_strdup( val ); + si->masteruri_bv = (BerVarray) ch_calloc( 2, sizeof( struct berval )); + ber_str2bv( si->masteruri, strlen( si->masteruri ), 0, &si->masteruri_bv[0] ); + si->masteruri_bv[1].bv_len = 0; + si->masteruri_bv[1].bv_val = NULL; gots |= GOT_HOST; } else if ( !strncasecmp( cargv[ i ], STARTTLSSTR, sizeof(STARTTLSSTR) - 1 ) ) diff --git a/servers/slapd/delete.c b/servers/slapd/delete.c index 4f983d0c99..5d5a10034a 100644 --- a/servers/slapd/delete.c +++ b/servers/slapd/delete.c @@ -211,7 +211,7 @@ do_delete( BerVarray defref = NULL; #ifdef LDAP_SYNCREPL if ( op->o_bd->syncinfo ) { - defref = op->o_bd->syncinfo->masteruri; + defref = op->o_bd->syncinfo->masteruri_bv; } else #endif { diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index e5d3e7ba07..d67d102288 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -448,7 +448,7 @@ do_modify( BerVarray defref = NULL; #ifdef LDAP_SYNCREPL if ( op->o_bd->syncinfo ) { - defref = op->o_bd->syncinfo->masteruri; + defref = op->o_bd->syncinfo->masteruri_bv; } else #endif { diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index 8e216dd3c2..0b6fa4d5f5 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -375,7 +375,7 @@ do_modrdn( BerVarray defref = NULL; #ifdef LDAP_SYNCREPL if ( op->o_bd->syncinfo ) { - defref = op->o_bd->syncinfo->masteruri; + defref = op->o_bd->syncinfo->masteruri_bv; } else #endif { diff --git a/servers/slapd/passwd.c b/servers/slapd/passwd.c index ef1382a6d3..21dcbfbd42 100644 --- a/servers/slapd/passwd.c +++ b/servers/slapd/passwd.c @@ -59,7 +59,7 @@ int passwd_extop( BerVarray defref = NULL; #ifdef LDAP_SYNCREPL if ( op->o_bd->syncinfo ) { - defref = op->o_bd->syncinfo->masteruri; + defref = op->o_bd->syncinfo->masteruri_bv; } else #endif { diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index a6dd87712e..98e2f06695 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -1298,44 +1298,45 @@ typedef struct syncinfo_s { struct slap_conn *conn; struct slap_backend_db *be; struct slap_entry *e; - void *ctx; - int id; - char *masteruri; - int type; + void *ctx; + int id; + char *masteruri; + BerVarray masteruri_bv; + int type; struct berval updatedn; - char *binddn; - int bindmethod; - char *passwd; - char *secprops; - char *realm; - char *authcId; - char *authzId; - char *srvtab; - char *saslmech; + char *binddn; + int bindmethod; + char *passwd; + char *secprops; + char *realm; + char *authcId; + char *authzId; + char *srvtab; + char *saslmech; time_t interval; - char *base; - int scope; - int deref; - int slimit; + char *base; + int scope; + int deref; + int slimit; int tlimit; - Filter *filter; - char *filterstr; - char **attrs; - int attrsonly; + Filter *filter; + char *filterstr; + char **attrs; + int attrsonly; #define LASTMOD_REQ 0 #define LASTMOD_GEN 1 #define LASTMOD_NO 2 - int lastmod; + int lastmod; /* TLS flags */ -#define TLS_OFF 0 -#define TLS_ON 1 -#define TLS_CRITICAL 2 - int tls; - int found; - struct berval *syncUUID; +#define TLS_OFF 0 +#define TLS_ON 1 +#define TLS_CRITICAL 2 + int tls; + int found; + struct berval *syncUUID; struct berval *syncUUID_ndn; - struct berval *syncCookie; - Avlnode *presentlist; + struct berval *syncCookie; + Avlnode *presentlist; LDAP_LIST_HEAD(np, nonpresent_entry) nonpresentlist; } syncinfo_t;