]> git.sur5r.net Git - openldap/commitdiff
ITS#6258
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 29 Sep 2009 21:05:44 +0000 (21:05 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 29 Sep 2009 21:05:44 +0000 (21:05 +0000)
CHANGES
doc/man/man8/slapcat.8
doc/man/man8/slaptest.8
servers/slapd/slapcommon.c

diff --git a/CHANGES b/CHANGES
index 4177fdde265f2877711a69047938dc61a1181bee..d6cc6af5cdc4e51a8e143d5bb5dca6fdeb16c59e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
 OpenLDAP 2.4 Change Log
 
 OpenLDAP 2.4.19 Engineering
+       Fixed slapd tools to allow -n for conversion (ITS#6258)
        Fixed slapo-dynlist lock leak (ITS#6308)
        Fixed slapo-pcache cache corruption (ITS#6242)
        Fixed contrib/nssov getgroupbymembers (ITS#6291)
index 14cf3b48d4ad2c5f17a294ad52862ce4dc40d07b..eda33474a8b32b57cbce16790f94158375f56a7e 100644 (file)
@@ -118,6 +118,7 @@ configuration file. The config database
 .BR slapd\-config (5),
 is always the first database, so use
 .B \-n 0
+to select it.
 
 The
 .B \-n
index cb6f93d9dae8a4685e2e17bc5ea6f50f8d616746..21739b71c12a94a0ef00670a3398d55c34389dde 100644 (file)
@@ -13,6 +13,8 @@ slaptest \- Check the suitability of the OpenLDAP slapd.conf file
 [\c
 .BI \-F \ confdir\fR]
 [\c
+.BI \-n dbnum\fR]
+[\c
 .BI \-o \ option\fR[ = value\fR]]
 [\c
 .BR \-Q ]
@@ -62,6 +64,15 @@ config file. If a valid config directory exists then the
 default config file is ignored. If dry-run mode is also specified,
 no conversion will occur.
 .TP
+.BI \-n \ dbnum
+Just open and test the \fIdbnum\fR-th database listed in the
+configuration file. 
+To only test the config database
+.BR slapd\-config (5),
+use 
+.B \-n 0
+as it is always the first database.
+.TP
 .BI \-o \ option\fR[ = value\fR]
 Specify an
 .I option
index a5d4b4f5c954e5d5afc41385f90b6c041e7b2d63..7c948a809d9cc42fc332982d13869259a5ff4c3f 100644 (file)
@@ -92,7 +92,7 @@ usage( int tool, const char *progname )
                break;
 
        case SLAPTEST:
-               options = " [-u]\n";
+               options = " [-n databasenumber] [-u]\n";
                break;
 
        case SLAPSCHEMA:
@@ -268,7 +268,7 @@ slap_tool_init(
                break;
 
        case SLAPTEST:
-               options = "d:f:F:o:Quv";
+               options = "d:f:F:n:o:Quv";
                mode |= SLAP_TOOL_READMAIN | SLAP_TOOL_READONLY;
                break;
 
@@ -608,8 +608,11 @@ slap_tool_init(
        }
 
        switch ( tool ) {
-       case SLAPDN:
        case SLAPTEST:
+               if ( dbnum >= 0 )
+                       goto get_db;
+               /* FALLTHRU */
+       case SLAPDN:
        case SLAPAUTH:
                be = NULL;
                goto startup;
@@ -733,6 +736,7 @@ slap_tool_init(
                exit( EXIT_FAILURE );
 
        } else {
+get_db:
                LDAP_STAILQ_FOREACH( be, &backendDB, be_next ) {
                        if ( dbnum == 0 ) break;
                        dbnum--;