segfaults in pam_smbpass in SAMBA_3_0 with unixsam backend

Steve Langasek vorlon at
Thu Oct 24 23:54:00 GMT 2002

Currently, pam_smbpass calls initialize_password_db() with reload == True
on every pass through the module.  This is supposedly the Right Thing
for the code to do, but recently the "reload" option took on actual
meaning, and now pam_smbpass segfaults on the second pass when using
the unixsam backend. :)

The problem is in pdb_interfaces.c:

static void free_pdb_context(struct pdb_context **context)
        struct pdb_methods *pdb_selected = (*context)->pdb_methods;

        while (pdb_selected){
                pdb_selected = pdb_selected->next;

        *context = NULL;

The nisplus and unixsam backends do not initialize the free_private_data
method.  Do these need to be implemented yet, or should they be stubbed
off and have error checking added to free_pdb_context() to check for a
null pointer?

Steve Langasek
postmodern programmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the samba-technical mailing list