[Openvpn-devel] Get rid of last PLUGIN_DEF_AUTH #ifdef

Message ID 20210401082934.29922-1-gert@greenie.muc.de
State Accepted
Headers show
Series [Openvpn-devel] Get rid of last PLUGIN_DEF_AUTH #ifdef | expand

Commit Message

Gert Doering March 31, 2021, 9:29 p.m. UTC
Commit 99d217b200 attempted to get rid of all #ifdef related to
--disable-def-auth but one of them managed to hide.  Remove.

The effect of this is that the "openvpn_acf_...tmp" files get not
removed after when an async auth plugin is in use.  This is can
get very annoying on a busy server.

Trac: #1186

Signed-off-by: Gert Doering <gert@greenie.muc.de>
---
 src/openvpn/ssl.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Antonio Quartulli March 31, 2021, 9:54 p.m. UTC | #1
Hi,

On 01/04/2021 10:29, Gert Doering wrote:
> Commit 99d217b200 attempted to get rid of all #ifdef related to
> --disable-def-auth but one of them managed to hide.  Remove.
> 
> The effect of this is that the "openvpn_acf_...tmp" files get not
> removed after when an async auth plugin is in use.  This is can
> get very annoying on a busy server.
> 
> Trac: #1186
> 
> Signed-off-by: Gert Doering <gert@greenie.muc.de>

nice catch :-)

Another chapter for "why ifdefs can be problematic..even after we have
tried to get rid of them".

Compile tested on my CI and tested in a setup not having def-auth in use
to make sure it wouldn't create side effects.

Acked-by: Antonio Quartulli <antonio@openvpn.net>
Gert Doering March 31, 2021, 10:58 p.m. UTC | #2
Patch has been applied to the master branch.

commit 997b006a266145c2797f7625eccb6f3623b7a59c
Author: Gert Doering
Date:   Thu Apr 1 10:29:34 2021 +0200

     Get rid of last PLUGIN_DEF_AUTH #ifdef

     Signed-off-by: Gert Doering <gert@greenie.muc.de>
     Acked-by: Antonio Quartulli <antonio@openvpn.net>
     Message-Id: <20210401082934.29922-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21933.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index 893e5753..08222b5e 100644
--- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c
@@ -992,9 +992,7 @@  key_state_free(struct key_state *ks, bool clear)
 
     packet_id_free(&ks->crypto_options.packet_id);
 
-#ifdef PLUGIN_DEF_AUTH
     key_state_rm_auth_control_files(ks);
-#endif
 
     if (clear)
     {