The Samba-Bugzilla – Bug 4831
pam_smbpass calls openlog(), can cause application segfaults
Last modified: 2009-05-26 09:40:13 UTC
pam_smbpass invariably calls setup_logging() when invoked, which calls openlog(). If the calling application also uses syslog, this will at best interfere with the logging settings of the application and at worst will crash the application. Such a crash in su was reported in Debian bug #434372.
Created attachment 2845 [details]
prelim patch to disable openlog(), closelog()
This patch eliminates the calls to setup_logging(), openlog(), and closelog() from within pam_smbpass.
Further improvements to the pam_smbpass logging code are possible; e.g., by switching the code to use the new Linux-PAM pam_vsyslog() API as pam_winbind already does. Please let me know if you would prefer this change to be made at the same time, I'm happy to prepare a patch for it.
Yes please, that would be very helpful ! Thanks.
Created attachment 2854 [details]
updated patch to switch to pam_vsyslog like pam_winbind
Here's an updated version of the patch that switches all logging to use pam_vsyslog() if available. Cheers!
thanks, pushed to master with caeae66c5, and to 3.4, too.