Changeset 525 in openpam for trunk


Ignore:
Timestamp:
Jan 11, 2012, 12:45:09 AM (8 years ago)
Author:
Dag-Erling Smørgrav
Message:

Improve error messages by logging the full path of the module we tried
to load rather than just the module name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/openpam_dynamic.c

    r521 r525  
    100100}
    101101#endif
    102    
     102
    103103/*
    104104 * OpenPAM internal
     
    132132                dlh = try_dlopen(vpath);
    133133        }
    134         serrno = errno;
    135         FREE(vpath);
    136         errno = serrno;
    137134        if (dlh == NULL)
    138135                goto err;
     
    165162                }
    166163        }
     164        FREE(vpath);
    167165        return (module);
    168166buf_err:
     167        serrno = errno;
    169168        if (dlh != NULL)
    170169                dlclose(dlh);
    171170        FREE(module);
     171        errno = serrno;
    172172err:
     173        serrno = errno;
    173174        if (errno != 0)
    174                 openpam_log(PAM_LOG_ERROR, "%s: %m", path);
     175                openpam_log(PAM_LOG_ERROR, "%s: %m", vpath);
     176        FREE(vpath);
     177        errno = serrno;
    175178        return (NULL);
    176179}
Note: See TracChangeset for help on using the changeset viewer.