Control: tags -1 + fixed-upstream

Hello,

A fix was commited upstream, I have attached the updated patch.

commit 5c2a3b5d29d10db3dbd8143ac2b671ce2eed1707
Author: Samuel Thibault
Date:   Thu Oct 9 23:40:49 2014 +0200
                                     
     Ensure that client-connect files are always deleted
                                                        
     Signed-off-by: David Sommerseth <[email protected]>
     Acked-by: David Sommerseth <[email protected]>     
     Message-Id: 20141012195919.GU3738@type        
     URL: http://thread.gmane.org/gmane.network.openvpn.devel/9104/focus=9118

Samuel
diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index 5910154..25e7384 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -1459,10 +1465,6 @@ multi_client_connect_post (struct multi_context *m,
                             option_types_found,
                             mi->context.c2.es);
 
-      if (!platform_unlink (dc_file))
-       msg (D_MULTI_ERRORS, "MULTI: problem deleting temporary file: %s",
-            dc_file);
-
       /*
        * If the --client-connect script generates a config file
        * with an --ifconfig-push directive, it will override any
@@ -1705,6 +1707,11 @@ multi_connection_established (struct multi_context *m, 
struct multi_instance *mi
              multi_client_connect_post (m, mi, dc_file, 
option_permissions_mask, &option_types_found);
              ++cc_succeeded_count;
            }
+
+         if (!platform_unlink (dc_file))
+           msg (D_MULTI_ERRORS, "MULTI: problem deleting temporary file: %s",
+                dc_file);
+
         script_depr_failed:
          argv_reset (&argv);
        }
@@ -1758,6 +1765,11 @@ multi_connection_established (struct multi_context *m, 
struct multi_instance *mi
            }
          else
            cc_succeeded = false;
+
+         if (!platform_unlink (dc_file))
+           msg (D_MULTI_ERRORS, "MULTI: problem deleting temporary file: %s",
+                dc_file);
+
         script_failed:
          argv_reset (&argv);
        }

Reply via email to