LDAP Error Handling Improvement

We have observed an interesting use case around using LDAP as a data store for Webmin. There are 2 different behaviors that we have observed:

1) When we lose connectivity to the LDAP service (while Webmin is running) we get connection reset by peer error messages accessing Webmin.

2) When restarting Webmin, we get the following error message:

service webmin restart
Stopping Webmin server in /usr/libexec/webmin
cat: /var/webmin/miniserv.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
Starting Webmin server in /usr/libexec/webmin
Undefined subroutine &miniserv::text called at /usr/libexec/webmin/miniserv.pl line 4772, <DATA> line 522.

We also have different behaviors between a service webmin start and service webmin restart. The start command outputs nothing and returns. The webmin restart command shows the above message.

I was able to isolate it to the userdb= line in the miniserv.conf file, as commenting that line and restarting webmin starts webmin as usual with no issues.

So, it seems like there are 2 possible ideas here: 1) add error handling to display error message in logs showing ldap is unreachable and 2) add error handling to miniserv to allow for error page instead of connection reset by peer on the web side.

Thanks,

-Alex

Status: 
Closed (fixed)

Comments

Thanks for finding this - the bug here is that when the LDAP connection fails, an invalid function is called which crashes the whole Webmin miniserv.pl process. This will be fixed in the 1.700 release.

Automatically closed -- issue fixed for 2 weeks with no activity.