diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2010-05-14 10:20:27 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2010-05-14 10:20:27 +0000 |
commit | 73ae8620ffa9d1ee66a4ed1bdb6802640f772355 (patch) | |
tree | d21b23391e51b3d4ef9029ae1ac445d154002fdd /compat | |
parent | c3b2f080065a43e3d1ab104dbc84409397a3b68f (diff) |
perform logging from PAM module to syslog and support the debug option to log debugging information
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1106 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'compat')
-rw-r--r-- | compat/pam_compat.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compat/pam_compat.h b/compat/pam_compat.h index 7556b36..7bb4081 100644 --- a/compat/pam_compat.h +++ b/compat/pam_compat.h @@ -67,4 +67,13 @@ int pam_prompt(pam_handle_t *pamh,int style,char **response,const char *format,. #define pam_modutil_getpwnam(pamh,user) getpwnam(user) #endif /* not HAVE_PAM_MODUTIL_GETGWNAM */ +/* fall back to using syslog() if pam_syslog() doesn't exist */ +#ifndef HAVE_PAM_SYSLOG +#ifndef LOG_AUTHPRIV +#define LOG_AUTHPRIV LOG_AUTH +#endif /* not LOG_AUTHPRIV */ +#define pam_syslog(pamh,priority,format,args...) \ + syslog(LOG_AUTHPRIV|(priority),format,##args) +#endif /* not HAVE_PAM_SYSLOG */ + #endif /* _COMPAT_LDAP_COMPAT_H */ |