From ee5fcf1db868d61138af7a96f1037f7ca51e55ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 30 Aug 2018 13:10:40 -0400 Subject: [PATCH] Fix: uninitialized fd value used in runas MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/common/runas.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/runas.c b/src/common/runas.c index 9fe6dcd58..317f68796 100644 --- a/src/common/runas.c +++ b/src/common/runas.c @@ -488,6 +488,9 @@ int handle_one_cmd(struct run_as_worker *worker) run_as_fct cmd; uid_t prev_euid; + memset(&sendret, 0, sizeof(sendret)); + sendret.fd = -1; + /* * Stage 1: Receive run_as_data struct from the master. * The structure contains the command type and all the parameters needed for -- 2.34.1