Changeset 594 in openpam for trunk/lib/openpam_debug.h


Ignore:
Timestamp:
Apr 14, 2012, 2:18:41 PM (9 years ago)
Author:
Dag-Erling Smørgrav
Message:

Add an experimental mechanism for enabling / disabling optional features.
Use it to control policy and module file checks. The default settings
correspond to the current behavior: disallow path separators in policy
names, but allow them in module names; verify ownership and permissions
for both policy files and modules.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/openpam_debug.h

    r522 r594  
    5959                openpam_log(PAM_LOG_LIBDEBUG, "entering: '%s'", s_); \
    6060} while (0)
     61#define ENTERF(f) do { \
     62        int f_ = (f); \
     63        if (f_ >= 0 && f_ <= OPENPAM_NUM_FEATURES) \
     64                openpam_log(PAM_LOG_LIBDEBUG, "entering: %s", \
     65                    openpam_features[f_].name); \
     66        else \
     67                openpam_log(PAM_LOG_LIBDEBUG, "entering: %d", f_); \
     68} while (0)
    6169#define RETURNV() openpam_log(PAM_LOG_LIBDEBUG, "returning")
    6270#define RETURNC(c) do { \
     
    94102#define ENTERN(n)
    95103#define ENTERS(s)
     104#define ENTERF(f)
    96105#define RETURNV() return
    97106#define RETURNC(c) return (c)
Note: See TracChangeset for help on using the changeset viewer.