Changeset 460 in openpam


Ignore:
Timestamp:
Nov 2, 2011, 1:56:03 PM (6 years ago)
Author:
Dag-Erling Smørgrav
Message:

Fix namespace violations in some symbols which have external linkage but
are not part of the API.

Location:
trunk/lib
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/openpam_configure.c

    r437 r460  
    5050#include "openpam_impl.h"
    5151
    52 const char *_pam_facility_name[PAM_NUM_FACILITIES] = {
     52const char *pam_facility_name[PAM_NUM_FACILITIES] = {
    5353        [PAM_ACCOUNT]           = "account",
    5454        [PAM_AUTH]              = "auth",
     
    5757};
    5858
    59 const char *_pam_control_flag_name[PAM_NUM_CONTROL_FLAGS] = {
     59const char *pam_control_flag_name[PAM_NUM_CONTROL_FLAGS] = {
    6060        [PAM_BINDING]           = "binding",
    6161        [PAM_OPTIONAL]          = "optional",
     
    166166                /* match facility name */
    167167                for (fclt = 0; fclt < PAM_NUM_FACILITIES; ++fclt)
    168                         if (match_word(p, _pam_facility_name[fclt]))
     168                        if (match_word(p, pam_facility_name[fclt]))
    169169                                break;
    170170                if (fclt == PAM_NUM_FACILITIES) {
     
    204204                /* control flag */
    205205                for (ctlf = 0; ctlf < PAM_NUM_CONTROL_FLAGS; ++ctlf)
    206                         if (match_word(p, _pam_control_flag_name[ctlf]))
     206                        if (match_word(p, pam_control_flag_name[ctlf]))
    207207                                break;
    208208                if (ctlf == PAM_NUM_CONTROL_FLAGS) {
  • trunk/lib/openpam_dispatch.c

    r437 r460  
    7575                openpam_log(PAM_LOG_ERROR,
    7676                    "%s() called while %s::%s() is in progress",
    77                     _pam_func_name[primitive],
     77                    pam_func_name[primitive],
    7878                    pamh->current->module->path,
    79                     _pam_sm_func_name[pamh->primitive]);
     79                    pam_sm_func_name[pamh->primitive]);
    8080                RETURNC(PAM_ABORT);
    8181        }
     
    105105                if (chain->module->func[primitive] == NULL) {
    106106                        openpam_log(PAM_LOG_ERROR, "%s: no %s()",
    107                             chain->module->path, _pam_sm_func_name[primitive]);
     107                            chain->module->path, pam_sm_func_name[primitive]);
    108108                        continue;
    109109                } else {
     
    114114                                ++openpam_debug;
    115115                        openpam_log(PAM_LOG_DEBUG, "calling %s() in %s",
    116                             _pam_sm_func_name[primitive], chain->module->path);
     116                            pam_sm_func_name[primitive], chain->module->path);
    117117                        r = (chain->module->func[primitive])(pamh, flags,
    118118                            chain->optc, (const char **)chain->optv);
    119119                        pamh->current = NULL;
    120120                        openpam_log(PAM_LOG_DEBUG, "%s: %s(): %s",
    121                             chain->module->path, _pam_sm_func_name[primitive],
     121                            chain->module->path, pam_sm_func_name[primitive],
    122122                            pam_strerror(pamh, r));
    123123                        if (debug)
     
    228228
    229229        openpam_log(PAM_LOG_ERROR, "%s(): unexpected return value %d",
    230             _pam_sm_func_name[primitive], r);
     230            pam_sm_func_name[primitive], r);
    231231}
    232232#endif /* !defined(OPENPAM_RELAX_CHECKS) */
  • trunk/lib/openpam_dynamic.c

    r437 r460  
    9898        for (i = 0; i < PAM_NUM_PRIMITIVES; ++i) {
    9999                module->func[i] = dlmodule ? dlmodule->func[i] :
    100                     (pam_func_t)dlsym(dlh, _pam_sm_func_name[i]);
     100                    (pam_func_t)dlsym(dlh, pam_sm_func_name[i]);
    101101                if (module->func[i] == NULL)
    102102                        openpam_log(PAM_LOG_DEBUG, "%s: %s(): %s",
    103                             path, _pam_sm_func_name[i], dlerror());
     103                            path, pam_sm_func_name[i], dlerror());
    104104        }
    105105        return (module);
  • trunk/lib/openpam_impl.h

    r459 r460  
    4141#include <security/openpam.h>
    4242
    43 extern const char *_pam_func_name[PAM_NUM_PRIMITIVES];
    44 extern const char *_pam_sm_func_name[PAM_NUM_PRIMITIVES];
    45 extern const char *_pam_err_name[PAM_NUM_ERRORS];
    46 extern const char *_pam_item_name[PAM_NUM_ITEMS];
     43extern const char *pam_func_name[PAM_NUM_PRIMITIVES];
     44extern const char *pam_sm_func_name[PAM_NUM_PRIMITIVES];
     45extern const char *pam_err_name[PAM_NUM_ERRORS];
     46extern const char *pam_item_name[PAM_NUM_ITEMS];
    4747
    4848extern int openpam_debug;
     
    137137        int _i = (i); \
    138138        if (_i > 0 && _i < PAM_NUM_ITEMS) \
    139                 openpam_log(PAM_LOG_DEBUG, "entering: %s", _pam_item_name[_i]); \
     139                openpam_log(PAM_LOG_DEBUG, "entering: %s", pam_item_name[_i]); \
    140140        else \
    141141                openpam_log(PAM_LOG_DEBUG, "entering: %d", _i); \
     
    156156        int _c = (c); \
    157157        if (_c >= 0 && _c < PAM_NUM_ERRORS) \
    158                 openpam_log(PAM_LOG_DEBUG, "returning %s", _pam_err_name[_c]); \
     158                openpam_log(PAM_LOG_DEBUG, "returning %s", pam_err_name[_c]); \
    159159        else \
    160160                openpam_log(PAM_LOG_DEBUG, "returning %d!", _c); \
  • trunk/lib/openpam_load.c

    r437 r460  
    4848#include "openpam_impl.h"
    4949
    50 const char *_pam_func_name[PAM_NUM_PRIMITIVES] = {
     50const char *pam_func_name[PAM_NUM_PRIMITIVES] = {
    5151        "pam_authenticate",
    5252        "pam_setcred",
     
    5757};
    5858
    59 const char *_pam_sm_func_name[PAM_NUM_PRIMITIVES] = {
     59const char *pam_sm_func_name[PAM_NUM_PRIMITIVES] = {
    6060        "pam_sm_authenticate",
    6161        "pam_sm_setcred",
  • trunk/lib/pam_get_item.c

    r444 r460  
    4646#include "openpam_impl.h"
    4747
    48 const char *_pam_item_name[PAM_NUM_ITEMS] = {
     48const char *pam_item_name[PAM_NUM_ITEMS] = {
    4949        "(NO ITEM)",
    5050        "PAM_SERVICE",
  • trunk/lib/pam_strerror.c

    r437 r460  
    4646#include "openpam_impl.h"
    4747
    48 const char *_pam_err_name[PAM_NUM_ERRORS] = {
     48const char *pam_err_name[PAM_NUM_ERRORS] = {
    4949        "PAM_SUCCESS",
    5050        "PAM_OPEN_ERR",
Note: See TracChangeset for help on using the changeset viewer.