summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Stenback <github@jstenback.com>2018-12-05 06:24:16 -0800
committerXander Desai <xdesai@duosecurity.com>2018-12-05 09:24:16 -0500
commit8c4d7c4affad93cbdc70180d0eb11a4869e5b298 (patch)
tree1bb33264c789d19cd3425467fa725caaff78a7e9
parent6e18d49664e93676b989903eff6e7c6ca164976b (diff)
downloadopenvpn-duo-plugin-8c4d7c4affad93cbdc70180d0eb11a4869e5b298.tar.gz
openvpn-duo-plugin-8c4d7c4affad93cbdc70180d0eb11a4869e5b298.zip
Don't hard code the script interpreter in duo_openvpn.c (#18)
The scripts themselves specify the interpreter, just execute them. This simplifies dealing with python2 vs python3, only the script needs to be modified, and not the C source.
-rw-r--r--duo_openvpn.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/duo_openvpn.c b/duo_openvpn.c
index 3b2ddb2..c6c8164 100644
--- a/duo_openvpn.c
+++ b/duo_openvpn.c
@@ -11,10 +11,8 @@
#include "openvpn-plugin.h"
#ifndef USE_PERL
-#define INTERPRETER "python"
#define DUO_SCRIPT_PATH PREFIX "/duo_openvpn.py"
#else
-#define INTERPRETER "perl"
#define DUO_SCRIPT_PATH PREFIX "/duo_openvpn.pl"
#endif
@@ -51,7 +49,7 @@ auth_user_pass_verify(struct context *ctx, const char *args[], const char *envp[
{
int pid;
const char *control, *username, *password, *ipaddr;
- char *argv[] = { INTERPRETER, DUO_SCRIPT_PATH, NULL };
+ char *argv[] = { DUO_SCRIPT_PATH, NULL };
control = get_env("auth_control_file", envp);
username = get_env("common_name", envp);