Changeset 522 in openpam
- Timestamp:
- Jan 11, 2012, 12:13:25 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/security/openpam.h
r455 r522 164 164 */ 165 165 enum { 166 PAM_LOG_LIBDEBUG = -1, 166 167 PAM_LOG_DEBUG, 167 168 PAM_LOG_VERBOSE, -
trunk/lib/openpam_debug.h
r511 r522 40 40 41 41 #ifdef OPENPAM_DEBUG 42 #define ENTER() openpam_log(PAM_LOG_ DEBUG, "entering")42 #define ENTER() openpam_log(PAM_LOG_LIBDEBUG, "entering") 43 43 #define ENTERI(i) do { \ 44 44 int i_ = (i); \ 45 45 if (i_ > 0 && i_ < PAM_NUM_ITEMS) \ 46 openpam_log(PAM_LOG_ DEBUG, "entering: %s", pam_item_name[i_]); \46 openpam_log(PAM_LOG_LIBDEBUG, "entering: %s", pam_item_name[i_]); \ 47 47 else \ 48 openpam_log(PAM_LOG_ DEBUG, "entering: %d", i_); \48 openpam_log(PAM_LOG_LIBDEBUG, "entering: %d", i_); \ 49 49 } while (0) 50 50 #define ENTERN(n) do { \ 51 51 int n_ = (n); \ 52 openpam_log(PAM_LOG_ DEBUG, "entering: %d", n_); \52 openpam_log(PAM_LOG_LIBDEBUG, "entering: %d", n_); \ 53 53 } while (0) 54 54 #define ENTERS(s) do { \ 55 55 const char *s_ = (s); \ 56 56 if (s_ == NULL) \ 57 openpam_log(PAM_LOG_ DEBUG, "entering: NULL"); \57 openpam_log(PAM_LOG_LIBDEBUG, "entering: NULL"); \ 58 58 else \ 59 openpam_log(PAM_LOG_ DEBUG, "entering: '%s'", s_); \59 openpam_log(PAM_LOG_LIBDEBUG, "entering: '%s'", s_); \ 60 60 } while (0) 61 #define RETURNV() openpam_log(PAM_LOG_ DEBUG, "returning")61 #define RETURNV() openpam_log(PAM_LOG_LIBDEBUG, "returning") 62 62 #define RETURNC(c) do { \ 63 63 int c_ = (c); \ 64 64 if (c_ >= 0 && c_ < PAM_NUM_ERRORS) \ 65 openpam_log(PAM_LOG_ DEBUG, "returning %s", pam_err_name[c_]); \65 openpam_log(PAM_LOG_LIBDEBUG, "returning %s", pam_err_name[c_]); \ 66 66 else \ 67 openpam_log(PAM_LOG_ DEBUG, "returning %d!", c_); \67 openpam_log(PAM_LOG_LIBDEBUG, "returning %d!", c_); \ 68 68 return (c_); \ 69 69 } while (0) 70 70 #define RETURNN(n) do { \ 71 71 int n_ = (n); \ 72 openpam_log(PAM_LOG_ DEBUG, "returning %d", n_); \72 openpam_log(PAM_LOG_LIBDEBUG, "returning %d", n_); \ 73 73 return (n_); \ 74 74 } while (0) … … 76 76 void *p_ = (p); \ 77 77 if (p_ == NULL) \ 78 openpam_log(PAM_LOG_ DEBUG, "returning NULL"); \78 openpam_log(PAM_LOG_LIBDEBUG, "returning NULL"); \ 79 79 else \ 80 openpam_log(PAM_LOG_ DEBUG, "returning %p", p_); \80 openpam_log(PAM_LOG_LIBDEBUG, "returning %p", p_); \ 81 81 return (p_); \ 82 82 } while (0) … … 84 84 const char *s_ = (s); \ 85 85 if (s_ == NULL) \ 86 openpam_log(PAM_LOG_ DEBUG, "returning NULL"); \86 openpam_log(PAM_LOG_LIBDEBUG, "returning NULL"); \ 87 87 else \ 88 openpam_log(PAM_LOG_ DEBUG, "returning '%s'", s_); \88 openpam_log(PAM_LOG_LIBDEBUG, "returning '%s'", s_); \ 89 89 return (s_); \ 90 90 } while (0) -
trunk/lib/openpam_log.c
r437 r522 72 72 73 73 switch (level) { 74 case PAM_LOG_LIBDEBUG: 74 75 case PAM_LOG_DEBUG: 75 76 if (!openpam_debug)
Note: See TracChangeset
for help on using the changeset viewer.