[Date Prev][Date Next]
(ITS#6482) slapcat doesn't continue with -c after the first corrupted database entry
OS: Gentoo Linux
Submission from: (NULL) (188.8.131.52)
Was not able to retrieve database entries from a corrupted LDAP database using
slapcat (openldap 2.4.19) with option -c. It aborts after the first corrupted
<= entry_decode: slap_str2undef_ad(object�!p): AttributeDescription
contains inappropriate characters
# no data for entry id=xxxxxxxx
and doesn't continue with the next valid entry as I would have expected.
A damaged database is not good, but as slapcat is described as the tool to
recover the non-corrupted data in various forums, it would be good when it
really continues on errors. Other ldap-related tools like ldapsearch ignore the
damaged data, so it is really annoying, when you want to recover your data and
don't even get all the readable entries.
The patch corrects the handling of damaged entries by slapcat when -c is used,
so that the output is continued with the next non-damaged entry. When -c is not
used slapcat stops after the first corrupted entry (as expected).
The patch works for me, but I know that it is not really correct, because when
there would be no non-damaged entry left it would either cause a endless loop or
So a modification would be needed to stop the loop when the last database entry
was processed, but I didn't know how to access that id.