mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-29 11:09:34 -05:00
hack to try as hard as possible to recover a broken database (ITS#6482)
This commit is contained in:
parent
4601107e4e
commit
dfe1f2e572
2 changed files with 21 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue