Changeset 414 in openpam for trunk


Ignore:
Timestamp:
Feb 14, 2008, 6:06:26 PM (11 years ago)
Author:
Dag-Erling Smørgrav
Message:

Un-screwup the debugging code. Now the "debug" keyword will work even
if OPENPAM_DEBUG is not defined (doing so generates far more debugging
information than you will ever want)

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/openpam_dispatch.c

    r408 r414  
    6161        pam_chain_t *chain;
    6262        int err, fail, r;
    63 #ifdef DEBUG
    6463        int debug;
    65 #endif
    6664
    6765        ENTER();
     
    108106                        pamh->primitive = primitive;
    109107                        pamh->current = chain;
    110 #ifdef DEBUG
    111108                        debug = (openpam_get_option(pamh, "debug") != NULL);
    112109                        if (debug)
     
    114111                        openpam_log(PAM_LOG_DEBUG, "calling %s() in %s",
    115112                            _pam_sm_func_name[primitive], chain->module->path);
    116 #endif
    117113                        r = (chain->module->func[primitive])(pamh, flags,
    118114                            chain->optc, (const char **)chain->optv);
    119115                        pamh->current = NULL;
    120 #ifdef DEBUG
    121116                        openpam_log(PAM_LOG_DEBUG, "%s: %s(): %s",
    122117                            chain->module->path, _pam_sm_func_name[primitive],
     
    124119                        if (debug)
    125120                                --_openpam_debug;
    126 #endif
    127121                }
    128122
  • trunk/lib/openpam_impl.h

    r408 r414  
    136136#define FREE(p) do { free((p)); (p) = NULL; } while (0)
    137137
    138 #ifdef DEBUG
     138#ifdef OPENPAM_DEBUG
    139139#define ENTER() openpam_log(PAM_LOG_DEBUG, "entering")
    140140#define ENTERI(i) do { \
Note: See TracChangeset for help on using the changeset viewer.