I am using ledgersmb 1.3.22.
The Backup DB and Backup Roles facility, made available through setup.pl, does not test for an error condition when creating the backup files.
Consequently, when sending the backup to the browser, a bad or empty file can be served, without any indication that something is wrong.
I built up a fine collection of zero-length backup files this way.
The proposed patch, which is attached in two parts:
1) Modifies Database.pm so that db_backup() and base_backup() methods check the exit code of pg_dump and pg_dumpall, returning undef if it is non-zero.
2) Modifies setup.pl to raise an error if the return value of Database::db_backup() or Database::base_backup() is false.
Any criticism and feedback always welcome. I hope this proves useful to others.