]> git.sur5r.net Git - openldap/commitdiff
- partial attribute replication tested ok
authorJong Hyuk Choi <jongchoi@openldap.org>
Wed, 2 Jul 2003 14:51:23 +0000 (14:51 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Wed, 2 Jul 2003 14:51:23 +0000 (14:51 +0000)
- conf file processing udpate
- misc updates

13 files changed:
servers/slapd/add.c
servers/slapd/back-bdb/delete.c
servers/slapd/back-bdb/modify.c
servers/slapd/back-bdb/modrdn.c
servers/slapd/config.c
servers/slapd/delete.c
servers/slapd/modify.c
servers/slapd/modrdn.c
servers/slapd/passwd.c
servers/slapd/proto-slap.h
servers/slapd/slap.h
servers/slapd/syncrepl.c
servers/slapd/tools/mimic.c

index 92e7a86804f2d12d55611c3e849f9b5d1485cbd3..e203d3b8a121ddbabe7077e95bde4d74e612a42d 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_bv;
+                               defref = op->o_bd->syncinfo->provideruri_bv;
                        } else
 #endif
                        {
index 3d382a2e42f2456a32c35892fdf534944a350a5b..5a8c63d35b5c13936c5b77dfaa717a601d6a69c3 100644 (file)
@@ -255,7 +255,7 @@ retry:      /* transaction retry */
                } else {
 #ifdef LDAP_SYNCREPL
                        BerVarray deref = op->o_bd->syncinfo ?
-                                                         op->o_bd->syncinfo->masteruri_bv : default_referral;
+                                                         op->o_bd->syncinfo->provideruri_bv : default_referral;
 #else
                        BerVarray deref = default_referral;
 #endif
index 089808a92694fe023eaf9ba1b05439b9a1cae62a..6bcaaa53d6b655575db254bfabac7b20e8ed6720 100644 (file)
@@ -429,7 +429,7 @@ retry:      /* transaction retry */
                } else {
 #ifdef LDAP_SYNCREPL
                        BerVarray deref = op->o_bd->syncinfo ?
-                                                         op->o_bd->syncinfo->masteruri_bv : default_referral;
+                                                         op->o_bd->syncinfo->provideruri_bv : default_referral;
 #else
                        BerVarray deref = default_referral;
 #endif
index 9c390b3810646e063aed57eb5735f0785a554105..e2838a7e9b1a8363f457e59507e4d6a711eed93c 100644 (file)
@@ -178,7 +178,7 @@ retry:      /* transaction retry */
                } else {
 #ifdef LDAP_SYNCREPL
                        BerVarray deref = op->o_bd->syncinfo ?
-                                                         op->o_bd->syncinfo->masteruri_bv : default_referral;
+                                                         op->o_bd->syncinfo->provideruri_bv : default_referral;
 #else
                        BerVarray deref = default_referral;
 #endif
index 8affc8270af32d62107d148eeca38c52f88877b0..02236eb0c0fcdbe219e5a2797ee49a9c220eba99 100644 (file)
@@ -2746,8 +2746,27 @@ add_syncrepl(
        si = be->syncinfo = (syncinfo_t *) ch_calloc( 1, sizeof( syncinfo_t ) );
 
        /* set default values; FIXME : add others */
+       si->tls = TLS_OFF;
+       if ( be->be_rootndn.bv_val )
+               ber_dupbv( &si->updatedn, &be->be_rootndn );
+       si->bindmethod = LDAP_AUTH_SIMPLE;
+       si->lastmod = LASTMOD_NO;
+       si->filterstr = "(objectclass=*)";
+       if ( be->be_suffix && be->be_suffix[0].bv_val )
+               si->base = ch_strdup( be->be_suffix[0].bv_val );
+       si->scope = LDAP_SCOPE_SUBTREE;
+       si->attrsonly = 0;
+       si->attrsexclude = 0;
+       si->attrs = (char **) ch_calloc( 1, sizeof( char * ));
+       si->attrs[0] = NULL;
+       si->type = LDAP_SYNC_REFRESH_ONLY;
+       si->interval = 86400;
+       si->syncCookie = NULL;
+       si->manageDSAit = 0;
        si->tlimit = -1;
        si->slimit = -1;
+       si->syncUUID = NULL;
+       si->syncUUID_ndn = NULL;
 
        si->presentlist = NULL;
        LDAP_LIST_INIT( &si->nonpresentlist );
@@ -2774,63 +2793,55 @@ add_syncrepl(
 #ifdef NEW_LOGGING
                LDAP_LOG ( CONFIG, RESULTS,
                        "add_syncrepl: Config: ** successfully added syncrepl \"%s\"\n",
-                       si->masteruri == NULL ? "(null)" : si->masteruri, 0, 0 );
+                       si->provideruri == NULL ? "(null)" : si->provideruri, 0, 0 );
 #else
                Debug( LDAP_DEBUG_CONFIG,
                        "Config: ** successfully added syncrepl \"%s\"\n",
-                       si->masteruri == NULL ? "(null)" : si->masteruri, 0, 0 );
+                       si->provideruri == NULL ? "(null)" : si->provideruri, 0, 0 );
 #endif
                si->be = be;
        }
 }
 
-#define IDSTR           "id"
-#define PROVIDERSTR     "provider"
-#define SUFFIXSTR       "suffix"
+#define IDSTR                  "id"
+#define PROVIDERSTR            "provider"
+#define SUFFIXSTR              "suffix"
 #define UPDATEDNSTR            "updatedn"
-#define BINDDNSTR       "binddn"
-#define BINDMETHSTR     "bindmethod"
-#define SIMPLESTR       "simple"
-#define SASLSTR         "sasl"
-#define CREDSTR         "credentials"
-#define OLDAUTHCSTR     "bindprincipal"
-#define AUTHCSTR        "authcID"
-#define AUTHZSTR        "authzID"
-#define SRVTABSTR       "srvtab"
-#define SASLMECHSTR     "saslmech"
-#define REALMSTR        "realm"
-#define SECPROPSSTR     "secprops"
-#define STARTTLSSTR     "starttls"
-#define CRITICALSTR     "critical"
-
-#define FILTERSTR       "filter"
-#define SEARCHBASESTR   "searchbase"
-#define SCOPESTR        "scope"
-#define ATTRSSTR        "attrs"
-#define ATTRSONLYSTR    "attrsonly"
-#define TYPESTR         "type"
-#define INTERVALSTR     "interval"
-#define COOKIESTR       "cookie"
-#define LASTMODSTR     "lastmod"
-#define LMREQSTR       "req"
-#define LMGENSTR       "gen"
-#define LMNOSTR                "no"
+#define BINDMETHSTR            "bindmethod"
+#define SIMPLESTR              "simple"
+#define SASLSTR                        "sasl"
+#define BINDDNSTR              "binddn"
+#define CREDSTR                        "credentials"
+#define OLDAUTHCSTR            "bindprincipal"
+#define AUTHCSTR               "authcID"
+#define AUTHZSTR               "authzID"
+#define SRVTABSTR              "srvtab"
+#define SASLMECHSTR            "saslmech"
+#define REALMSTR               "realm"
+#define SECPROPSSTR            "secprops"
+#define STARTTLSSTR            "starttls"
+#define CRITICALSTR            "critical"
+
+#define FILTERSTR              "filter"
+#define SEARCHBASESTR  "searchbase"
+#define SCOPESTR               "scope"
+#define ATTRSSTR               "attrs"
+#define ATTRSONLYSTR   "attrsonly"
+#define TYPESTR                        "type"
+#define INTERVALSTR            "interval"
+#define COOKIESTR              "cookie"
+#define LASTMODSTR             "lastmod"
+#define LMREQSTR               "req"
+#define LMGENSTR               "gen"
+#define LMNOSTR                        "no"
+#define MANAGEDSAITSTR "manageDSAit"
+#define SLIMITSTR              "sizelimit"
+#define TLIMITSTR              "timelimit"
 
 #define GOT_ID                 0x0001
-#define GOT_HOST               0x0002
-#define GOT_DN                 0x0004
-#define GOT_METHOD             0x0008
-#define GOT_MECH               0x0010
-#define GOT_FILTER             0x0020
-#define GOT_SEARCHBASE 0x0040
-#define GOT_SCOPE              0x0080
-#define GOT_ATTRS              0x0100
-#define GOT_TYPE               0x0200
-#define GOT_INTERVAL   0x0400
-#define GOT_LASTMOD            0x0800
-#define GOT_UPDATEDN   0x1000
-
-#define GOT_ALL                        0x1FFF
+#define GOT_PROVIDER   0x0002
+#define GOT_METHOD             0x0004
+#define GOT_ALL                        0x0007
 
 static int
 parse_syncrepl_line(
@@ -2853,12 +2864,12 @@ parse_syncrepl_line(
                } else if ( !strncasecmp( cargv[ i ], PROVIDERSTR,
                                        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;
+                       si->provideruri = ch_strdup( val );
+                       si->provideruri_bv = (BerVarray) ch_calloc( 2, sizeof( struct berval ));
+                       ber_str2bv( si->provideruri, strlen( si->provideruri ), 0, &si->provideruri_bv[0] );
+                       si->provideruri_bv[1].bv_len = 0;
+                       si->provideruri_bv[1].bv_val = NULL;
+                       gots |= GOT_PROVIDER;
                } else if ( !strncasecmp( cargv[ i ], STARTTLSSTR,
                        sizeof(STARTTLSSTR) - 1 ) )
                {
@@ -2878,12 +2889,6 @@ parse_syncrepl_line(
                        dnNormalize( 0, NULL, NULL, &updatedn, &si->updatedn, NULL );
                        ch_free( str );
                        ch_free( updatedn.bv_val );
-                       gots |= GOT_UPDATEDN;
-               } else if ( !strncasecmp( cargv[ i ],
-                               BINDDNSTR, sizeof( BINDDNSTR ) - 1 ) ) {
-                       val = cargv[ i ] + sizeof( BINDDNSTR );
-                       si->binddn = ch_strdup( val );
-                       gots |= GOT_DN;
                } else if ( !strncasecmp( cargv[ i ], BINDMETHSTR,
                                sizeof( BINDMETHSTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( BINDMETHSTR );
@@ -2896,30 +2901,18 @@ parse_syncrepl_line(
                        } else {
                                si->bindmethod = -1;
                        }
-               } else if ( !strncasecmp( cargv[ i ], LASTMODSTR,
-                               sizeof( LASTMODSTR ) - 1 ) ) {
-                       val = cargv[ i ] + sizeof( LASTMODSTR );
-                       if ( !strcasecmp( val, LMREQSTR )) {
-                               si->lastmod = LASTMOD_REQ;
-                               gots |= GOT_LASTMOD;
-                       } else if ( !strcasecmp( val, LMGENSTR )) {
-                               si->lastmod = LASTMOD_GEN;
-                               gots |= GOT_LASTMOD;
-                       } else if ( !strcasecmp( val, LMNOSTR )) {
-                               si->lastmod = LASTMOD_NO;
-                               gots |= GOT_LASTMOD;
-                       } else {
-                               si->lastmod = -1;
-                       }
                } else if ( !strncasecmp( cargv[ i ],
-                               SASLMECHSTR, sizeof( SASLMECHSTR ) - 1 ) ) {
-                       val = cargv[ i ] + sizeof( SASLMECHSTR );
-                       gots |= GOT_MECH;
-                       si->saslmech = ch_strdup( val );
+                               BINDDNSTR, sizeof( BINDDNSTR ) - 1 ) ) {
+                       val = cargv[ i ] + sizeof( BINDDNSTR );
+                       si->binddn = ch_strdup( val );
                } else if ( !strncasecmp( cargv[ i ],
                                CREDSTR, sizeof( CREDSTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( CREDSTR );
                        si->passwd = ch_strdup( val );
+               } else if ( !strncasecmp( cargv[ i ],
+                               SASLMECHSTR, sizeof( SASLMECHSTR ) - 1 ) ) {
+                       val = cargv[ i ] + sizeof( SASLMECHSTR );
+                       si->saslmech = ch_strdup( val );
                } else if ( !strncasecmp( cargv[ i ],
                                SECPROPSSTR, sizeof( SECPROPSSTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( SECPROPSSTR );
@@ -2948,20 +2941,29 @@ parse_syncrepl_line(
                                free( si->srvtab );
                        }
                        si->srvtab = ch_strdup( val );
+               } else if ( !strncasecmp( cargv[ i ], LASTMODSTR,
+                               sizeof( LASTMODSTR ) - 1 ) ) {
+                       val = cargv[ i ] + sizeof( LASTMODSTR );
+                       if ( !strcasecmp( val, LMREQSTR )) {
+                               si->lastmod = LASTMOD_REQ;
+                       } else if ( !strcasecmp( val, LMGENSTR )) {
+                               si->lastmod = LASTMOD_GEN;
+                       } else if ( !strcasecmp( val, LMNOSTR )) {
+                               si->lastmod = LASTMOD_NO;
+                       } else {
+                               si->lastmod = -1;
+                       }
                } else if ( !strncasecmp( cargv[ i ],
                                FILTERSTR, sizeof( FILTERSTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( FILTERSTR );
-                       gots |= GOT_FILTER;
                        si->filterstr = ch_strdup( val );
                } else if ( !strncasecmp( cargv[ i ],
                                SEARCHBASESTR, sizeof( SEARCHBASESTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( SEARCHBASESTR );
-                       gots |= GOT_SEARCHBASE;
                        si->base = ch_strdup( val );
                } else if ( !strncasecmp( cargv[ i ],
                                SCOPESTR, sizeof( SCOPESTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( SCOPESTR );
-                       gots |= GOT_SCOPE;
                        if ( !strncasecmp( val, "base", sizeof( "base" ) - 1 )) {
                                si->scope = LDAP_SCOPE_BASE;
                        } else if ( !strncasecmp( val, "one", sizeof( "one" ) - 1 )) {
@@ -2978,18 +2980,20 @@ parse_syncrepl_line(
                        si->attrsonly = 1;
                } else if ( !strncasecmp( cargv[ i ],
                                ATTRSSTR, sizeof( ATTRSSTR ) - 1 ) ) {
-                       val = cargv[ i ] + sizeof( ATTRSSTR );
-                       si->attrs = NULL;
-                       si->attrs = str2clist( si->attrs, val, "," );
-                       gots |= GOT_ATTRS;
+                       val = cargv[ i ] + sizeof( ATTRSSTR ) - 1;
+                       if ( *val == '!' ) {
+                               si->attrsexclude = 1;
+                               val++;
+                       }
+                       if ( *val++ != '=' )
+                               continue;
+                       str2clist( &si->attrs, val, "," );
                } else if ( !strncasecmp( cargv[ i ],
                                TYPESTR, sizeof( TYPESTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( TYPESTR );
-                       gots |= GOT_TYPE;
                        if ( !strncasecmp( val, "refreshOnly", sizeof( "refreshOnly" ) - 1 )) {
                                si->type = LDAP_SYNC_REFRESH_ONLY;
                        } else if ( !strncasecmp( val, "refreshAndPersist", sizeof( "refreshAndPersist" ) - 1 )) {
-                               gots |= GOT_INTERVAL;
                                si->type = LDAP_SYNC_REFRESH_AND_PERSIST;
                                si->interval = 0;
                        } else {
@@ -3000,8 +3004,7 @@ parse_syncrepl_line(
                } else if ( !strncasecmp( cargv[ i ],
                                INTERVALSTR, sizeof( INTERVALSTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( INTERVALSTR );
-                       gots |= GOT_INTERVAL;
-                       if ( gots & GOT_TYPE && si->type == LDAP_SYNC_REFRESH_AND_PERSIST )
+                       if ( si->type == LDAP_SYNC_REFRESH_AND_PERSIST )
                                si->interval = 0;
                        else
                                si->interval = atoi( val );
@@ -3015,22 +3018,24 @@ parse_syncrepl_line(
                                COOKIESTR, sizeof( COOKIESTR ) - 1 ) ) {
                        val = cargv[ i ] + sizeof( COOKIESTR );
                        si->syncCookie = ber_str2bv( val, strlen( val ), 1, NULL );
+               } else if ( !strncasecmp( cargv[ i ],
+                               MANAGEDSAITSTR, sizeof( MANAGEDSAITSTR ) - 1 ) ) {
+                       val = cargv[ i ] + sizeof( COOKIESTR );
+                       si->manageDSAit = atoi( val );
+               } else if ( !strncasecmp( cargv[ i ],
+                               SLIMITSTR, sizeof( SLIMITSTR ) - 1 ) ) {
+                       val = cargv[ i ] + sizeof( SLIMITSTR );
+                       si->slimit = atoi( val );
+               } else if ( !strncasecmp( cargv[ i ],
+                               TLIMITSTR, sizeof( TLIMITSTR ) - 1 ) ) {
+                       val = cargv[ i ] + sizeof( TLIMITSTR );
+                       si->tlimit = atoi( val );
                } else {
                        fprintf( stderr, "Error: parse_syncrepl_line: "
                                                         "unknown keyword \"%s\"\n", cargv[ i ] );
                }
        }
 
-       if ( si->bindmethod == LDAP_AUTH_SASL) {
-               if ((gots & GOT_MECH) == 0) {
-                       fprintf( stderr, "Error: \"syncrepl\" line needs SASLmech flag " 
-                                        "in slapd config file\n" );
-                       return -1;
-               }
-       }
-
-       gots |= GOT_MECH;
-
        if ( gots != GOT_ALL ) {
                fprintf( stderr, "Error: Malformed \"syncrepl\" line in slapd config file"
  );
index 5d5a10034a18de20c60aae25e64a7c48ca402f7a..7d04e551c17504b3319725b4bf2d84c68c7a9178 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_bv;
+                               defref = op->o_bd->syncinfo->provideruri_bv;
                        } else
 #endif
                        {
index d67d102288a416233b57174b83c0c0f90e026d0f..0ca45624ca3d25e0c85180826084c087a00cb5ec 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_bv;
+                               defref = op->o_bd->syncinfo->provideruri_bv;
                        } else
 #endif
                        {
index 0b6fa4d5f5df3d3b01fdb8c15733eac78199b41e..c901dd3434260d6b514823b0ab09bf5f4a167b4f 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_bv;
+                               defref = op->o_bd->syncinfo->provideruri_bv;
                        } else
 #endif
                        {
index 21dcbfbd42dbe9cbe939dfb0f31da47a474bb9fa..edb34415e46fe3d2c820857906ffd7a9f724fcb1 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_bv;
+                       defref = op->o_bd->syncinfo->provideruri_bv;
                } else
 #endif
                {
index e94158bf4448eef876e7b2d06c58684943c867ff..ecd2b1302fad12efe1455e6110edf94c88c2610e 100644 (file)
@@ -1156,7 +1156,7 @@ LDAP_SLAPD_F (int) syncrepl_entry LDAP_P((
 LDAP_SLAPD_F (void) syncrepl_updateCookie LDAP_P((
                                                        syncinfo_t *, LDAP *, Operation *, struct berval *,
                                                        struct berval * ));
-LDAP_SLAPD_F (char **) str2clist LDAP_P(( char **, char *, const char * ));
+LDAP_SLAPD_F (char **) str2clist LDAP_P(( char ***, char *, const char * ));
 #endif
 
 LDAP_END_DECL
index 98e2f06695fefbaf9636179f2a576490b27cd530..0264a48a2e6d5320c640143201501e62859ed9db 100644 (file)
@@ -1300,42 +1300,41 @@ typedef struct syncinfo_s {
         struct slap_entry *e;
         void                   *ctx;
         int                            id;
-        char                   *masteruri;
-        BerVarray              masteruri_bv;
-        int                            type;
+        char                   *provideruri;
+        BerVarray              provideruri_bv;
+#define TLS_OFF                        0
+#define TLS_ON                 1
+#define TLS_CRITICAL   2
+        int                            tls;
                struct berval   updatedn;       
-        char                   *binddn;
         int                            bindmethod;
+        char                   *binddn;
         char                   *passwd;
+        char                   *saslmech;
         char                   *secprops;
         char                   *realm;
         char                   *authcId;
         char                   *authzId;
         char                   *srvtab;
-        char                   *saslmech;
-        time_t                 interval;
-        char                   *base;
-        int                            scope;
-        int                            deref;
-        int                            slimit;
-               int                             tlimit;
-        Filter                 *filter;
-        char                   *filterstr;
-        char                   **attrs;
-        int                            attrsonly;
 #define LASTMOD_REQ            0
 #define LASTMOD_GEN            1
 #define LASTMOD_NO             2
         int                            lastmod;
-        /* TLS flags */
-#define TLS_OFF                        0
-#define TLS_ON                 1
-#define TLS_CRITICAL   2
-        int                            tls;
-        int                            found;
+        Filter                 *filter;
+        char                   *filterstr;
+        char                   *base;
+        int                            scope;
+        int                            attrsonly;
+               int                             attrsexclude;
+        char                   **attrs;
+        int                            type;
+        time_t                 interval;
+        struct berval  *syncCookie;
+        int                            manageDSAit;
+        int                            slimit;
+               int                             tlimit;
         struct berval  *syncUUID;
                struct berval   *syncUUID_ndn;
-        struct berval  *syncCookie;
         Avlnode                        *presentlist;
                LDAP_LIST_HEAD(np, nonpresent_entry) nonpresentlist;
 } syncinfo_t;
index 8ae1aacc8040d89da0efe911cec6c7859e018e3d..18f6534602f9bbe0bf9187cae16f45122ef5e5eb 100644 (file)
@@ -265,16 +265,16 @@ do_syncrepl(
 
        /* Init connection to master */
 
-       rc = ldap_initialize( &ld, si->masteruri );
+       rc = ldap_initialize( &ld, si->provideruri );
        if ( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, ERR, "do_syncrepl: "
                        "ldap_initialize failed (%s)\n",
-                       si->masteruri, 0, 0 );
+                       si->provideruri, 0, 0 );
 #else
                Debug( LDAP_DEBUG_ANY, "do_syncrepl: "
                        "ldap_initialize failed (%s)\n",
-                       si->masteruri, 0, 0 );
+                       si->provideruri, 0, 0 );
 #endif
        }
 
@@ -314,11 +314,11 @@ do_syncrepl(
 #ifdef NEW_LOGGING
                                LDAP_LOG ( OPERATION, ERR, "do_bind: Error: "
                                        "ldap_set_option(%s,SECPROPS,\"%s\") failed!\n",
-                                       si->masteruri, si->secprops, 0 );
+                                       si->provideruri, si->secprops, 0 );
 #else
                                Debug( LDAP_DEBUG_ANY, "Error: ldap_set_option "
                                        "(%s,SECPROPS,\"%s\") failed!\n",
-                                       si->masteruri, si->secprops, NULL );
+                                       si->provideruri, si->secprops, NULL );
 #endif
                                return NULL;
                        }
@@ -2059,7 +2059,7 @@ null_callback(
 
 
 char **
-str2clist( char **out, char *in, const char *brkstr )
+str2clist( char ***out, char *in, const char *brkstr )
 {
        char    *str;
        char    *s;
@@ -2069,7 +2069,7 @@ str2clist( char **out, char *in, const char *brkstr )
        char    **new;
 
        /* find last element in list */
-       for (i = 0; out && out[i]; i++);
+       for (i = 0; *out && *out[i]; i++);
        
        /* protect the input string from strtok */
        str = ch_strdup( in );
@@ -2082,8 +2082,8 @@ str2clist( char **out, char *in, const char *brkstr )
                }
        }
 
-       out = ch_realloc( out, ( i + j + 1 ) * sizeof( char * ) );
-       new = out + i;
+       *out = ch_realloc( *out, ( i + j + 1 ) * sizeof( char * ) );
+       new = *out + i;
        for ( s = ldap_pvt_strtok( str, brkstr, &lasts );
                s != NULL;
                s = ldap_pvt_strtok( NULL, brkstr, &lasts ) )
@@ -2094,7 +2094,7 @@ str2clist( char **out, char *in, const char *brkstr )
 
        *new = NULL;
        free( str );
-       return( out );
+       return( *out );
 }
 
 #endif
index 2b45be055ac9573c6bf799cb7f23b6a2c72d2b6e..16b5d4b3d56c2fca3295acb2ff7f2258b4e2be18 100644 (file)
@@ -264,7 +264,7 @@ void* do_syncrepl( void *ctx, void *arg )
        return NULL;
 }
 
-char** str2clist( char **out, char *in, const char *brkstr )
+char** str2clist( char ***out, char *in, const char *brkstr )
 {
        return NULL;
 }