aboutsummaryrefslogtreecommitdiff
blob: 829decec90c24d55b0efbd0226fedff32de68bb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef PAM_MOD_MISC_H
#define PAM_MOD_MISC_H

/*
 * All of this file has been taken from freebsd-lib and has been slightly
 * modified to avoid any problems when used on Linux machines. It provides
 * an easier logging interface and some additional options for OpenPAM.
 */

#ifndef __linux__
# include <sys/cdefs.h>
#endif


/*
 * Common option names
 */
#define	PAM_OPT_NULLOK		"nullok"
#define PAM_OPT_AUTH_AS_SELF	"auth_as_self"
#define PAM_OPT_ECHO_PASS	"echo_pass"
#define PAM_OPT_DEBUG		"debug"


#define	PAM_LOG(...) \
	openpam_log(PAM_LOG_DEBUG, __VA_ARGS__)

#define	PAM_ERROR(...) \
	openpam_log(PAM_LOG_ERROR, __VA_ARGS__)

#define PAM_RETURN(arg) \
	return (arg)

#define PAM_VERBOSE_ERROR(...) \
	_pam_verbose_error(pamh, flags, __FILE__, __FUNCTION__, __VA_ARGS__)

#endif