#include <syslog.h>#include <security/pam_ext.h>

Go to the source code of this file.
Defines | |
| #define | m2s(s) str(s) |
| #define | str(s) #s |
| #define | PAM_KMUX_MSG_O_ELE element |
| #define | PMA_KMUX_MSG_O_DBG debug |
| #define | PAM_KMUX_MSG_O_DB database |
| #define | PAM_KMUX_MSG_O_TYPE type |
| #define | PAM_KMUX_MSG_O_PORT port |
| #define | PAM_KMUX_MSG_O_TO timeout |
| #define | PAM_KMUX_MSG_O_HOST host |
| #define | PAM_KMUX_MSG_O_USER user |
| #define | PAM_KMUX_MSG_O_PW password |
| #define | PAM_KMUX_MSG_O_TAB table |
| #define | PAM_KMUX_MSG_O_PWCOL password_column |
| #define | PAM_KMUX_MSG_O_USERCOL user_column |
| #define | PAM_KMUX_MSG_O_PWTYPE password_type |
| #define | PAM_KMUX_MSG_O_AUTQY auth_query |
| #define | PAM_KMUX_MSG_O_PWQY password_query |
| #define | PAM_KMUX_MSG_O_SSLMODE sslmode |
| #define | PAM_KMUX_MSG_O_PAMOD PAM_KMUX_MSG_O_ELE PAM_KMUX_MSG_O_DBG |
| #define | PAM_KMUX_MSG_O_MOD |
| #define | PAM_KMUX_MSG_O_PW_CLEAR "CLEAR" |
| #define | PAM_KMUX_MSG_O_PW_MD5 "MD5" |
| #define | PAM_KMUX_MSG_O_PW_CRYPT "CRYPT" |
| #define | PAM_KMUX_MSG_O_PW_CRYPT_MD5 "CRYPT_MD5" |
| #define | PAM_KMUX_MSG_O_PW_SHA1 "SHA1" |
| #define | PAM_KMUX_MSG_O_PW_T9 "T9" |
| #define | PAM_KMUX_MSG_O_PW_T9_MD5 "T9_MD5" |
| #define | PAM_KMUX_MSG_O_UNDEF "UNDEFINED" |
| #define | PAM_KMUX_MSG_O_DB_FIREBIRD "FIREBIRD" |
| #define | PAM_KMUX_MSG_O_DB_MYSQL "MYSQL" |
| #define | PAM_KMUX_MSG_O_DB_POSTGRES "POSTGRES" |
| #define | PAM_KMUX_MSG_O_DB_UNDEF "UNDEFINED" |
| #define | PAM_KMUX_MSG_COMBUILD_ERR "something went wrong trying to build command" |
| #define | PAM_KMUX_MSG_COMBUILD_SUCC "successfully builded command" |
| #define | PAM_KMUX_MSG_FETCHRES_ERR "can not fetch result" |
| #define | PAM_KMUX_MSG_FETCHRES_SUCC "successfully fetched result" |
| #define | PAM_KMUX_MSG_GETTOK "successfully fetched authtok" |
| #define | PAM_KMUX_MSG_PW_INP "user defined password" |
| #define | PAM_KMUX_MSG_PW_COMP_SUCC "passwords are equal" |
| #define | PAM_KMUX_MSG_PW_COMP_ERR "passwords are not equal" |
| #define | PAM_KMUX_MSG_RES_ERR "result invalid" |
| #define | PAM_KMUX_MSG_QY_ERR "something went wrong trying to execute query" |
| #define | PAM_KMUX_MSG_QY_SUCC "successfully executed query" |
| #define | PAM_KMUX_MSG_CHARDET "character detected" |
| #define | PAM_KMUX_MSG_HASH_ERR "hashify password fails" |
| #define | PAM_KMUX_MSG_HASH_SUCC "successfully hashified password" |
| #define | PAM_KMUX_MSG_HASH_SPEC "specified hash" |
| #define | PAM_KMUX_MSG_DB_CONN_NULL "connection is null" |
| #define | PAM_KMUX_MSG_DB_CONN_TRY "trying to establish a connection to database" |
| #define | PAM_KMUX_MSG_DB_CONN_ERR "can not establish connection to database" |
| #define | PAM_KMUX_MSG_DB_CONN_SUCC "successfully connected to database" |
| #define | PAM_KMUX_MSG_DB_OPT_ERR "can not set options for database" |
| #define | PAM_KMUX_MSG_DB_DCONN "close connection to database" |
| #define | PAM_KMUX_MSG_DB_DCONN_TRY "trying close connection to database" |
| #define | PAM_KMUX_MSG_DB_DCONN_ERR "can not close connection to database" |
| #define | PAM_KMUX_MSG_DB_DCONN_SUCC "successfully closed connection to database" |
| #define | PAM_KMUX_MSG_CONFFILE_TRY "trying to load configuration file" |
| #define | PAM_KMUX_MSG_CONFFILE_ERR "can not load configuration file" |
| #define | PAM_KMUX_MSG_CONFFILE_SUCC "successfully loaded configuration file" |
| #define | PAM_KMUX_MSG_CONFFILE_INVAL "malformed configuration file" |
| #define | PAM_KMUX_MSG_CONFPARSE_ERR "error while trying to pare configuration file" |
| #define | PAM_KMUX_MSG_PW_ENC_TRY "try to encrypt password" |
| #define | PAM_KMUX_MSG_PW_ENC_ERR "password encryption fails" |
| #define | PAM_KMUX_MSG_PW_ENC_SUCC "successfully encrypted password" |
| #define | PAM_KMUX_MSG_F_EXEC_PARAM_ERR "something went wrong trying to run exec param" |
| #define | PAM_KMUX_MSG_F_EXEC_PARAM_SUCC "successfully run exec param" |
| #define | PAM_KMUX_MSG_F_BACKEND_AUTH "something went wrong trying to run backend_authenticate" |
| #define | PAM_KMUX_MSG_F_STARTER_LOOP "staring loop over all databases" |
| #define | PAM_KMUX_MSG_F_PARSE_OPTIONS "parsing module options specified in pam stack" |
| #define | PAM_KMUX_DBG pam_syslog(pamh, (int)pamod_options.debug, "[%s,%d,%s]\n", __FILE__, __LINE__, __func__) |
| #define | logopts log_options(options) |
| #define | logdbg(...) |
| #define | loginfo(...) pam_syslog(pamod_options.pamh, LG_INFO, __VA_ARGS__) |
| #define | logerr(...) pam_syslog(pamod_options.pamh, LG_ERR, __VA_ARGS__ ) |
Message Makros. This File contains all Makros used for debugging.
| #define logdbg | ( | ... | ) |
if ( pamod_options.debug == LG_DEBUG ) \ pam_syslog(pamod_options.pamh, LG_DEBUG, __VA_ARGS__)
general debugging
| #define logerr | ( | ... | ) | pam_syslog(pamod_options.pamh, LG_ERR, __VA_ARGS__ ) |
| #define loginfo | ( | ... | ) | pam_syslog(pamod_options.pamh, LG_INFO, __VA_ARGS__) |
logging in info mode
| #define logopts log_options(options) |
if debug flag is settet log the additional meta information
| #define m2s | ( | s | ) | str(s) |
Macros to transform macro to string
| #define PAM_KMUX_DBG pam_syslog(pamh, (int)pamod_options.debug, "[%s,%d,%s]\n", __FILE__, __LINE__, __func__) |
macro which is used to pake it possible to debug more information
| #define PAM_KMUX_MSG_CHARDET "character detected" |
| #define PAM_KMUX_MSG_COMBUILD_ERR "something went wrong trying to build command" |
Common messages
| #define PAM_KMUX_MSG_COMBUILD_SUCC "successfully builded command" |
| #define PAM_KMUX_MSG_CONFFILE_ERR "can not load configuration file" |
| #define PAM_KMUX_MSG_CONFFILE_INVAL "malformed configuration file" |
| #define PAM_KMUX_MSG_CONFFILE_SUCC "successfully loaded configuration file" |
| #define PAM_KMUX_MSG_CONFFILE_TRY "trying to load configuration file" |
Conffile messages
| #define PAM_KMUX_MSG_CONFPARSE_ERR "error while trying to pare configuration file" |
| #define PAM_KMUX_MSG_DB_CONN_ERR "can not establish connection to database" |
| #define PAM_KMUX_MSG_DB_CONN_NULL "connection is null" |
Database connection messages
| #define PAM_KMUX_MSG_DB_CONN_SUCC "successfully connected to database" |
| #define PAM_KMUX_MSG_DB_CONN_TRY "trying to establish a connection to database" |
| #define PAM_KMUX_MSG_DB_DCONN "close connection to database" |
| #define PAM_KMUX_MSG_DB_DCONN_ERR "can not close connection to database" |
| #define PAM_KMUX_MSG_DB_DCONN_SUCC "successfully closed connection to database" |
| #define PAM_KMUX_MSG_DB_DCONN_TRY "trying close connection to database" |
| #define PAM_KMUX_MSG_DB_OPT_ERR "can not set options for database" |
| #define PAM_KMUX_MSG_F_BACKEND_AUTH "something went wrong trying to run backend_authenticate" |
| #define PAM_KMUX_MSG_F_EXEC_PARAM_ERR "something went wrong trying to run exec param" |
function messages
| #define PAM_KMUX_MSG_F_EXEC_PARAM_SUCC "successfully run exec param" |
| #define PAM_KMUX_MSG_F_PARSE_OPTIONS "parsing module options specified in pam stack" |
| #define PAM_KMUX_MSG_F_STARTER_LOOP "staring loop over all databases" |
| #define PAM_KMUX_MSG_FETCHRES_ERR "can not fetch result" |
| #define PAM_KMUX_MSG_FETCHRES_SUCC "successfully fetched result" |
| #define PAM_KMUX_MSG_GETTOK "successfully fetched authtok" |
| #define PAM_KMUX_MSG_HASH_ERR "hashify password fails" |
| #define PAM_KMUX_MSG_HASH_SPEC "specified hash" |
| #define PAM_KMUX_MSG_HASH_SUCC "successfully hashified password" |
| #define PAM_KMUX_MSG_O_AUTQY auth_query |
| #define PAM_KMUX_MSG_O_DB database |
| #define PAM_KMUX_MSG_O_DB_FIREBIRD "FIREBIRD" |
Database types
| #define PAM_KMUX_MSG_O_DB_MYSQL "MYSQL" |
| #define PAM_KMUX_MSG_O_DB_POSTGRES "POSTGRES" |
| #define PAM_KMUX_MSG_O_DB_UNDEF "UNDEFINED" |
| #define PAM_KMUX_MSG_O_ELE element |
Options messages
| #define PAM_KMUX_MSG_O_HOST host |
| #define PAM_KMUX_MSG_O_MOD |
| #define PAM_KMUX_MSG_O_PAMOD PAM_KMUX_MSG_O_ELE PAM_KMUX_MSG_O_DBG |
| #define PAM_KMUX_MSG_O_PORT port |
| #define PAM_KMUX_MSG_O_PW password |
| #define PAM_KMUX_MSG_O_PW_CLEAR "CLEAR" |
Password hash types
| #define PAM_KMUX_MSG_O_PW_CRYPT "CRYPT" |
| #define PAM_KMUX_MSG_O_PW_CRYPT_MD5 "CRYPT_MD5" |
| #define PAM_KMUX_MSG_O_PW_MD5 "MD5" |
| #define PAM_KMUX_MSG_O_PW_SHA1 "SHA1" |
| #define PAM_KMUX_MSG_O_PW_T9 "T9" |
| #define PAM_KMUX_MSG_O_PW_T9_MD5 "T9_MD5" |
| #define PAM_KMUX_MSG_O_PWCOL password_column |
| #define PAM_KMUX_MSG_O_PWQY password_query |
| #define PAM_KMUX_MSG_O_PWTYPE password_type |
| #define PAM_KMUX_MSG_O_SSLMODE sslmode |
| #define PAM_KMUX_MSG_O_TAB table |
| #define PAM_KMUX_MSG_O_TO timeout |
| #define PAM_KMUX_MSG_O_TYPE type |
| #define PAM_KMUX_MSG_O_UNDEF "UNDEFINED" |
| #define PAM_KMUX_MSG_O_USER user |
| #define PAM_KMUX_MSG_O_USERCOL user_column |
| #define PAM_KMUX_MSG_PW_COMP_ERR "passwords are not equal" |
| #define PAM_KMUX_MSG_PW_COMP_SUCC "passwords are equal" |
| #define PAM_KMUX_MSG_PW_ENC_ERR "password encryption fails" |
| #define PAM_KMUX_MSG_PW_ENC_SUCC "successfully encrypted password" |
| #define PAM_KMUX_MSG_PW_ENC_TRY "try to encrypt password" |
Password encryption messages
| #define PAM_KMUX_MSG_PW_INP "user defined password" |
| #define PAM_KMUX_MSG_QY_ERR "something went wrong trying to execute query" |
| #define PAM_KMUX_MSG_QY_SUCC "successfully executed query" |
| #define PAM_KMUX_MSG_RES_ERR "result invalid" |
| #define PMA_KMUX_MSG_O_DBG debug |
| #define str | ( | s | ) | #s |
1.6.3