
Gemäß dem D(x)
in pam_macros.h
( definierten MakroQuellcode) und wie folgt verwendet:
D(("Hello PAM World"));
Wo befindet sich dieses Protokoll CentOS7
?
debug
Beachten Sie, dass ich es als Flag in meiner pam.d
Konfigurationsdatei verwende .
Ich habe auch den folgenden Befehl ausprobiert:
grep -rnw '/var/log/' -e "Hello Pam World"
Allerdings ohne Erfolg.
Antwort1
Die PAM-Implementierung von Apple für Mac OS X ist möglicherweise nicht die ideale Informationsquelle für PAM unter Centos 7.
# yum -y install pam-devel
# rpm -ql pam-devel | grep macro
/usr/include/security/_pam_macros.h
# grep FILE `!!`
grep FILE `rpm -ql pam-devel | grep macro`
* _PAM_LOGFILE must exist and be writable to the programs you debug.
#ifndef _PAM_LOGFILE
#define _PAM_LOGFILE "/var/run/pam-debug.log"
FILE *logfile;
if ((fd = open(_PAM_LOGFILE, O_WRONLY|O_NOFOLLOW|O_APPEND)) != -1) {
if ((fd = open(_PAM_LOGFILE, O_WRONLY|O_APPEND)) != -1) {
FILE *logfile;
if ((fd = open(_PAM_LOGFILE, O_WRONLY|O_NOFOLLOW|O_APPEND)) != -1) {
if ((fd = open(_PAM_LOGFILE, O_WRONLY|O_APPEND)) != -1) {
_pam_output_debug_info(__FILE__, __FUNCTION__, __LINE__); \
Außerdem muss PAM mit der Definition kompiliert werden, DEBUG
damit dieser Code erreicht werden kann.