]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slapcommon.c
ITS#2919 add a user modifiable generalizedTime attribute
[openldap] / servers / slapd / slapcommon.c
index f048dc56ea223825c2f389774698b65cc1233e2d..9aa87ea91abb71922d90a52ff5a2e9c6ac2cf305 100644 (file)
@@ -60,7 +60,7 @@ usage( int tool, const char *progname )
 
        case SLAPADD:
                options = "\n\t[-n databasenumber | -b suffix]\n"
-                       "\t[-l ldiffile] [-u] [-w]\n";
+                       "\t[-l ldiffile] [-q] [-u] [-w]\n";
                break;
 
        case SLAPAUTH:
@@ -69,7 +69,7 @@ usage( int tool, const char *progname )
 
        case SLAPCAT:
                options = "\n\t[-n databasenumber | -b suffix]"
-                       " [-l ldiffile] [-a filter] [-m] [-k]\n";
+                       " [-l ldiffile] [-a filter]\n";
                break;
 
        case SLAPDN:
@@ -77,7 +77,7 @@ usage( int tool, const char *progname )
                break;
 
        case SLAPINDEX:
-               options = "\n\t[-n databasenumber | -b suffix]\n";
+               options = "\n\t[-n databasenumber | -b suffix] [-q]\n";
                break;
 
        case SLAPTEST:
@@ -127,7 +127,7 @@ slap_tool_init(
 
        switch( tool ) {
        case SLAPADD:
-               options = "b:cd:f:l:n:tuvw";
+               options = "b:cd:f:l:n:qtuvw";
                break;
 
        case SLAPCAT:
@@ -151,7 +151,7 @@ slap_tool_init(
                break;
 
        case SLAPINDEX:
-               options = "b:cd:f:n:v";
+               options = "b:cd:f:n:qv";
                mode |= SLAP_TOOL_READMAIN;
                break;
 
@@ -201,7 +201,11 @@ slap_tool_init(
                        break;
 
                case 'n':       /* which config file db to index */
-                       dbnum = atoi( optarg ) - 1;
+                       dbnum = atoi( optarg );
+                       break;
+
+               case 'q':       /* turn on quick */
+                       mode |= SLAP_TOOL_QUICK;
                        break;
 
                case 'R':
@@ -229,7 +233,7 @@ slap_tool_init(
                        verbose++;
                        break;
 
-               case 'w':       /* write context csn on at the end */
+               case 'w':       /* write context csn at the end */
                        update_ctxcsn++;
                        break;
 
@@ -285,6 +289,8 @@ slap_tool_init(
                break;
        }
 
+       ldap_syslog = 0;
+
        if ( ldiffile == NULL ) {
                ldiffp = tool == SLAPCAT ? stdout : stdin;
 
@@ -337,7 +343,7 @@ slap_tool_init(
                exit( EXIT_FAILURE );
        }
 
-       ldap_syslog = 0;
+       at_oc_cache = 1;
 
        switch ( tool ) {
        case SLAPADD:
@@ -436,7 +442,7 @@ slap_tool_init(
                        exit( EXIT_FAILURE );
                }
                
-               be = &backends[dbnum=0];
+               be = &backends[dbnum=1];
                /* If just doing the first by default and it is a
                 * glue subordinate, find the master.
                 */