summaryrefslogtreecommitdiff
path: root/openvpn/src/plugins/auth-pam/auth-pam.c
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-07-21 01:11:36 +0200
committerArne Schwabe <arne@rfc2549.org>2012-07-21 01:11:36 +0200
commitb179d94eb3b87e46721e7060386ff1a2f64669a6 (patch)
tree2d602225b423424100d022085376a36a765d0ff9 /openvpn/src/plugins/auth-pam/auth-pam.c
parent266db4b701d38f52fa246af45778bb2fcee9893c (diff)
Update openvpn to Version 2.3_alpha3
Diffstat (limited to 'openvpn/src/plugins/auth-pam/auth-pam.c')
-rw-r--r--openvpn/src/plugins/auth-pam/auth-pam.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/openvpn/src/plugins/auth-pam/auth-pam.c b/openvpn/src/plugins/auth-pam/auth-pam.c
index e52f6322..bd717927 100644
--- a/openvpn/src/plugins/auth-pam/auth-pam.c
+++ b/openvpn/src/plugins/auth-pam/auth-pam.c
@@ -26,12 +26,14 @@
* OpenVPN plugin module to do PAM authentication using a split
* privilege model.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
-#if DLOPEN_PAM
-#include <dlfcn.h>
-#include "pamdl.h"
-#else
#include <security/pam_appl.h>
+
+#ifdef USE_PAM_DLOPEN
+#include "pamdl.h"
#endif
#include <stdio.h>
@@ -46,7 +48,7 @@
#include <signal.h>
#include <syslog.h>
-#include "openvpn-plugin.h"
+#include <openvpn-plugin.h>
#define DEBUG(verb) ((verb) >= 4)
@@ -693,7 +695,7 @@ pam_server (int fd, const char *service, int verb, const struct name_value_list
{
struct user_pass up;
int command;
-#if DLOPEN_PAM
+#ifdef USE_PAM_DLOPEN
static const char pam_so[] = "libpam.so";
#endif
@@ -703,7 +705,7 @@ pam_server (int fd, const char *service, int verb, const struct name_value_list
if (DEBUG (verb))
fprintf (stderr, "AUTH-PAM: BACKGROUND: INIT service='%s'\n", service);
-#if DLOPEN_PAM
+#ifdef USE_PAM_DLOPEN
/*
* Load PAM shared object
*/
@@ -794,7 +796,7 @@ pam_server (int fd, const char *service, int verb, const struct name_value_list
}
done:
-#if DLOPEN_PAM
+#ifdef USE_PAM_DLOPEN
dlclose_pam ();
#endif
if (DEBUG (verb))