#2 QMailAdmin and Segmentation fault in template.c

open
nobody
None
5
2009-08-21
2009-08-21
Anonymous
No

QMailadmin 1.2.13
VPopmail 5.5.0

Segmentation fault caused by vauth_getpw() in get_session_val() in template.c.
Since VPopmail has changed API vauth_getpw() causes segmentation fault unless vauth_load_module() is called before.

My fix:

add to qmailadmin.c in main() after init_globals():

vauth_load_module(NULL);

Regards

Discussion

  • Mark Goldey
    Mark Goldey
    2010-10-20

    This worked for me as well. Qmailadmin 1.2.14 and VPopmail 5.5.0

    Without the fix, the qmailadmin script returns a blank screen, Apache generates a 500 error, and syslog contains something like this:

    [1510588.627230] qmailadmin[1719]: segfault at 0 ip (null) sp bfc2dfec error 4 in qmailadmin[8048000+14000]

    Another problem, unrelated but perhaps helpful if you're reading this: VPOPMAILDIR is now undefined in config.h. Simply add:

    #define VPOPMAILDIR "/home/vpopmail"

    into config.h to solve this problem (change /home/vpopmail if necessary)