]> git.sur5r.net Git - openldap/commitdiff
ITS#6482
authorQuanah Gibson-Mount <quanah@openldap.org>
Mon, 3 Jan 2011 21:18:14 +0000 (21:18 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 3 Jan 2011 21:18:14 +0000 (21:18 +0000)
CHANGES
doc/man/man8/slapcat.8
servers/slapd/slapcat.c

diff --git a/CHANGES b/CHANGES
index 8b40f8143e95deaf935f1433b902b6bceff374b9..db7d04c192aedf7668125ab9a1e5b5303390a101 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,9 +3,10 @@ OpenLDAP 2.4 Change Log
 OpenLDAP 2.4.24 Engineering
        Added contrib/noopsrch for entry counting (ITS#6598)
        Added slapadd attribute value checking (ITS#6592)
+       Added slapcat continue mode for problematic DBs (ITS#6482)
        Added slapd-null back-config support (ITS#6624)
        Added slapd-sql autocommit support (ITS#6612)
-       Addes slapd-sql support for long long keys (ITS#6617)
+       Added slapd-sql support for long long keys (ITS#6617)
        Fixed liblber to not close invalid sockets (ITS#6585)
        Fixed libldap dnssrv port format specifier (ITS#6644)
        Fixed libldap EOF handling (ITS#6723)
index 4673e49118529f42f6aced4d5655b1cf1774151c..02e64c89880af5809472dd45d44cb774ceb1a42a 100644 (file)
@@ -82,6 +82,11 @@ option.
 .TP
 .B \-c
 Enable continue (ignore errors) mode.
+Multiple occorrences of
+.B \-c
+make
+.BR slapcat (8)
+try harder.
 .TP
 .BI \-d \ debug-level
 Enable debugging messages as defined by the specified
index af1cae4993e4f17c6d4703ffc382c0659ceaea56..c4e7a7d6586d5ccda5f665de5aaa5e3064b4b306 100644 (file)
@@ -109,8 +109,22 @@ slapcat( int argc, char **argv )
                if ( e == NULL ) {
                        printf("# no data for entry id=%08lx\n\n", (long) id );
                        rc = EXIT_FAILURE;
-                       if( continuemode ) continue;
-                       break;
+                       if ( continuemode == 0 ) {
+                               break;
+
+                       } else if ( continuemode == 1 ) {
+                               continue;
+                       }
+
+                       /* this is a last resort: linearly scan all ids
+                        * trying to recover as much as possible (ITS#6482) */
+                       while ( ++id != NOID ) {
+                               e = be->be_entry_get( be, id );
+                               if ( e != NULL ) break;
+                               printf("# no data for entry id=%08lx\n\n", (long) id );
+                       }
+
+                       if ( e == NULL ) break;
                }
 
                if ( doBSF ) {