[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#5387) slapcat ignores errors while writing output (no space left on device, etc)



Full_Name: Jonathan Clarke
Version: 2.3, HEAD
OS: Linux
URL: ftp://ftp.openldap.org/incoming/jonathan-clarke-20080220.patch.3
Submission from: (NULL) (213.41.243.192)


Hi all,

When slapcat is writing it's output to disk, it ignores any errors (with slapcat
-l output_file or slapcat > output_file). If an error is encountered, such as
"No space left on device", slapcat then exits normally with a return code of 0.

This seems pretty dangerous to me - if you back up your database with slapcat,
but don't get an error on failure, it could easily lead to data loss.

Please find at the address below a patch to stop on such errors. It may require
some cleaning up - apologies if so.

Regards,
Jonathan