diff options
Diffstat (limited to 'eurephia-auth.c')
-rw-r--r-- | eurephia-auth.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/eurephia-auth.c b/eurephia-auth.c index c4ac5b5..8831581 100644 --- a/eurephia-auth.c +++ b/eurephia-auth.c @@ -56,6 +56,13 @@ static const char *plugin_type_name(const int type) return "(UNKNOWN PLUGIN CODE)"; } } + +static void dump_env(FILE *f, const char *prefix, const char *envp[]) { + int i; + for (i = 0; envp[i]; i++) { + fprintf(f, "%s%s\n", prefix, envp[i]); + } +} #endif @@ -123,6 +130,13 @@ OPENVPN_EXPORT int openvpn_plugin_func_v1(openvpn_plugin_handle_t handle, DEBUG(ctx, 10, "openvpn_plugin_func_v1(ctx, %s, ...)", plugin_type_name(type)); +#ifdef ENABLE_DEBUG + if( ctx->loglevel >= 30 ) { + dump_env(ctx->log, "ENV: ", envp); + dump_env(ctx->log, "ARG: ", argv); + } +#endif + switch( type ) { case OPENVPN_PLUGIN_TLS_VERIFY: result = eurephia_tlsverify(ctx, envp, argv[1]); |