]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Bump version of openvpn plugin argument structs to 5
authorSelva Nair <selva.nair@gmail.com>
Wed, 8 Aug 2018 02:44:30 +0000 (22:44 -0400)
committerGert Doering <gert@greenie.muc.de>
Wed, 8 Aug 2018 07:04:16 +0000 (09:04 +0200)
This was missed in commit 6690769f78bbfb889fef2a54088d979896c87d51
that exported base64_encode and base64_decode() functions.

Also check the version is >= 5 in auth-pam plugin to ensure
that the base64_decode function pointer can be referenced.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1533696271-21799-1-git-send-email-selva.nair@gmail.com>
URL: https://www.mail-archive.com/search?l=mid&q=1533696271-21799-1-git-send-email-selva.nair@gmail.com
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit da0a42ca98623487726162b8710690cd3d003a63)

include/openvpn-plugin.h.in
src/plugins/auth-pam/auth-pam.c

index e71ad305526b826a850b4d209d6237d8b12c9021..a604f1c1ec81416ace0cc85139b54e0e4a5cb1cc 100644 (file)
@@ -221,10 +221,11 @@ struct openvpn_plugin_string_list
  *           OpenVPN to plug-ins.
  *
  *    4      Exported secure_memzero() as plugin_secure_memzero()
- *           Exported openvpn_base64_encode() as plugin_base64_encode()
+ *
+ *    5      Exported openvpn_base64_encode() as plugin_base64_encode()
  *           Exported openvpn_base64_decode() as plugin_base64_decode()
  */
-#define OPENVPN_PLUGINv3_STRUCTVER 4
+#define OPENVPN_PLUGINv3_STRUCTVER 5
 
 /**
  * Definitions needed for the plug-in callback functions.
index 26b0eeba9e87dfd1d8ef176b24554e4b5a3e77bf..5ba4dc4cb55da01854fabf2e42e42dcfcbcb5078 100644 (file)
@@ -292,8 +292,8 @@ openvpn_plugin_open_v3(const int v3structver,
     const char **argv = args->argv;
     const char **envp = args->envp;
 
-    /* Check API compatibility -- struct version 4 or higher needed */
-    if (v3structver < 4)
+    /* Check API compatibility -- struct version 5 or higher needed */
+    if (v3structver < 5)
     {
         fprintf(stderr, "AUTH-PAM: This plugin is incompatible with the running version of OpenVPN\n");
         return OPENVPN_PLUGIN_FUNC_ERROR;