forced saveConf does not correctly report success on MySQL/MariaDB
Affected version
Version: 2.16.2
Summary
- Try to run convertConfig from Files to MySQL
Unable to store configuration 1: Lemonldap::NG::Common::Conf::Backends::CDBI loaded.
Get configuration 1.
Configuration 1 stored.
(the process stops with an exit code of 7 and no other sessions are converted, despite success)
Another way to reproduce the issue
lemonldap-ng-cli -force 1 -yes 1 set https 1
cfgNum forced with 1Could not save configuration:
Possible fixes
In saveConf:
return ( $self->unlock() ? $tmp : UNKNOWN_ERROR );
In MySQL the unlock function returns false if the lock hasn't been acquired first, which is the case when "force" has been set