Changeset 660 in openpam for trunk/lib


Ignore:
Timestamp:
Mar 11, 2013, 3:08:52 PM (8 years ago)
Author:
Dag-Erling Smørgrav
Message:

Use dlfunc() if available; if not, fake it in terms of dlsym().

Location:
trunk/lib/libpam
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/libpam/Makefile.am

    r648 r660  
    1313        openpam_ctype.h \
    1414        openpam_debug.h \
     15        openpam_dlfunc.h \
    1516        openpam_features.h \
    1617        openpam_impl.h \
  • trunk/lib/libpam/openpam_dynamic.c

    r649 r660  
    5252#include "openpam_impl.h"
    5353#include "openpam_asprintf.h"
     54#include "openpam_dlfunc.h"
    5455
    5556#ifndef RTLD_NOW
     
    151152                } else {
    152153                        module->func[i] =
    153                             (pam_func_t)dlsym(dlh, pam_sm_func_name[i]);
     154                            (pam_func_t)dlfunc(dlh, pam_sm_func_name[i]);
    154155                        /*
    155156                         * This openpam_log() call is a major source of
     
    158159                         * be less problematic if dlerror() returned an
    159160                         * error code so we could log an error only when
    160                          * dlsym() failed for a reason other than "no such
    161                          * symbol".
     161                         * dlfunc() failed for a reason other than "no
     162                         * such symbol".
    162163                         */
    163164#if 0
Note: See TracChangeset for help on using the changeset viewer.