]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/main.c
ITS#2919 move OpenLDAPtime to OpenLDAPperson
[openldap] / servers / slapd / main.c
index 8922d0fbab1f10c56fda97bac5b17978d048289f..c88876e046dcfbc2c281e7f92d2ed4144a9ffab9 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2004 The OpenLDAP Foundation.
+ * Copyright 1998-2005 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -259,7 +259,6 @@ int main( int argc, char **argv )
        char        *serverName;
        int         serverMode = SLAP_SERVER_MODE;
 
-       struct berval cookie = BER_BVNULL;
        struct sync_cookie *scp = NULL;
        struct sync_cookie *scp_entry = NULL;
 
@@ -356,8 +355,7 @@ int main( int argc, char **argv )
                case 'c':       /* provide sync cookie, override if exist in replica */
                        scp = (struct sync_cookie *) ch_calloc( 1,
                                                                                sizeof( struct sync_cookie ));
-                       ber_str2bv( optarg, strlen( optarg ), 1, &cookie );
-                       ber_bvarray_add( &scp->octet_str, &cookie );
+                       ber_str2bv( optarg, 0, 1, &scp->octet_str );
                        slap_parse_sync_cookie( scp );
 
                        LDAP_STAILQ_FOREACH( scp_entry, &slap_sync_cookie, sc_next ) {
@@ -620,6 +618,12 @@ unhandled_option:;
                goto destroy;
        }
 
+#ifdef SLAP_DYNACL
+       if ( acl_init() ) {
+               goto destroy;
+       }
+#endif /* SLAP_DYNACL */
+
        if ( read_config( configfile, 0 ) != 0 ) {
                rc = 1;
                SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 19 );
@@ -641,13 +645,6 @@ unhandled_option:;
                }
        }
 
-       if ( glue_sub_init( ) != 0 ) {
-               Debug( LDAP_DEBUG_ANY,
-                   "subordinate config error\n",
-                   0, 0, 0 );
-               goto destroy;
-       }
-
        if ( slap_schema_check( ) != 0 ) {
                Debug( LDAP_DEBUG_ANY,
                    "schema prep error\n",