aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'include/pam_mod_misc.h')
-rwxr-xr-xinclude/pam_mod_misc.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/pam_mod_misc.h b/include/pam_mod_misc.h
new file mode 100755
index 0000000..b1609fc
--- /dev/null
+++ b/include/pam_mod_misc.h
@@ -0,0 +1,33 @@
+#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_RETURN(arg) \
+ return (arg)
+
+#define PAM_VERBOSE_ERROR(...) \
+ _pam_verbose_error(pamh, flags, __FILE__, __FUNCTION__, __VA_ARGS__)
+
+#endif