File NM-openvpn-ensure-proper-termination.patch of Package NetworkManager-openvpn.14994

From 0f4ae722034df25139434ae40de322803a2753a7 Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Thu, 10 May 2018 00:02:31 +0200
Subject: [PATCH] service: fix initialization of pid_data

The struct field 'is_terminating' is left uninitialized and this makes
pids_pending_send_sigterm() randomly ignore the openvpn process.

Fixes: c303f0d1599e6ae11b2c6ae0c10e4467ffd618d8

https://bugzilla.gnome.org/show_bug.cgi?id=795858
---
 src/nm-openvpn-service.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 79de8ed..7a04258 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -667,9 +667,8 @@ pids_pending_add (GPid pid, NMOpenvpnPlugin *plugin)
 
 	_LOGI ("openvpn[%ld] started", (long) pid);
 
-	pid_data = g_slice_new (PidsPendingData);
+	pid_data = g_slice_new0 (PidsPendingData);
 	pid_data->pid = pid;
-	pid_data->kill_id = 0;
 	pid_data->watch_id = g_child_watch_add (pid, pids_pending_child_watch_cb, pid_data);
 	pid_data->plugin = plugin;
 	g_object_add_weak_pointer ((GObject *) plugin, (gpointer *) &pid_data->plugin);
-- 
2.24.1

openSUSE Build Service is sponsored by