summaryrefslogtreecommitdiffstats
path: root/plugin/auth-pam
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/auth-pam')
-rw-r--r--plugin/auth-pam/.svnignore1
-rw-r--r--plugin/auth-pam/auth-pam.c8
2 files changed, 8 insertions, 1 deletions
diff --git a/plugin/auth-pam/.svnignore b/plugin/auth-pam/.svnignore
new file mode 100644
index 0000000..140f8cf
--- /dev/null
+++ b/plugin/auth-pam/.svnignore
@@ -0,0 +1 @@
+*.so
diff --git a/plugin/auth-pam/auth-pam.c b/plugin/auth-pam/auth-pam.c
index 5047b34..a2b2934 100644
--- a/plugin/auth-pam/auth-pam.c
+++ b/plugin/auth-pam/auth-pam.c
@@ -48,7 +48,7 @@
#include "openvpn-plugin.h"
-#define DEBUG(verb) ((verb) >= 7)
+#define DEBUG(verb) ((verb) >= 4)
/* Command codes for foreground -> background communication */
#define COMMAND_VERIFY 0
@@ -206,6 +206,8 @@ send_string (int fd, const char *string)
return -1;
}
+#ifdef DO_DAEMONIZE
+
/*
* Daemonize if "daemon" env var is true.
* Preserve stderr across daemonization if
@@ -233,6 +235,8 @@ daemonize (const char *envp[])
}
}
+#endif
+
/*
* Close most of parent's fds.
* Keep stdin/stdout/stderr, plus one
@@ -405,8 +409,10 @@ openvpn_plugin_open_v1 (unsigned int *type_mask, const char *argv[], const char
/* Ignore most signals (the parent will receive them) */
set_signals ();
+#ifdef DO_DAEMONIZE
/* Daemonize if --daemon option is set. */
daemonize (envp);
+#endif
/* execute the event loop */
pam_server (fd[1], argv[1], context->verb, &name_value_list);