]> git.sur5r.net Git - openldap/commitdiff
ITS#2618 fix
authorJong Hyuk Choi <jongchoi@openldap.org>
Fri, 27 Jun 2003 20:29:32 +0000 (20:29 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Fri, 27 Jun 2003 20:29:32 +0000 (20:29 +0000)
servers/slapd/add.c
servers/slapd/config.c
servers/slapd/delete.c
servers/slapd/modify.c
servers/slapd/modrdn.c
servers/slapd/passwd.c
servers/slapd/slap.h

index 2a4651abf50c63b02394aa263edbb9bc76fac006..92e7a86804f2d12d55611c3e849f9b5d1485cbd3 100644 (file)
@@ -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
                        {
index 178af28e6da97aeeac5c853eee392d150ffffb8c..8affc8270af32d62107d148eeca38c52f88877b0 100644 (file)
@@ -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 ) )
index 4f983d0c99ce1d53e7393fbe3bcb672035325e97..5d5a10034a18de20c60aae25e64a7c48ca402f7a 100644 (file)
@@ -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
                        {
index e5d3e7ba07bd7ed660f4030719a9041129a75b3e..d67d102288a416233b57174b83c0c0f90e026d0f 100644 (file)
@@ -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
                        {
index 8e216dd3c2bf618d5015a327b0fec097aa8bbe7b..0b6fa4d5f5df3d3b01fdb8c15733eac78199b41e 100644 (file)
@@ -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
                        {
index ef1382a6d3c330b7dc20e038b5efa1292318dc25..21dcbfbd42dbe9cbe939dfb0f31da47a474bb9fa 100644 (file)
@@ -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
                {
index a6dd87712e7913c50be60ad470fa65394c0612a6..98e2f06695fefbaf9636179f2a576490b27cd530 100644 (file)
@@ -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;