From: Jérémie Galarneau Date: Thu, 30 Aug 2018 17:00:53 +0000 (-0400) Subject: Fix: report setegid()/seteuid() failure in runas X-Git-Tag: v2.11.0-rc1~23 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=561f5f2c7bfe491f6a2b1254545f143901b11cd7;p=lttng-tools.git Fix: report setegid()/seteuid() failure in runas Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/runas.c b/src/common/runas.c index 4a8536c6d..9fe6dcd58 100644 --- a/src/common/runas.c +++ b/src/common/runas.c @@ -528,6 +528,8 @@ int handle_one_cmd(struct run_as_worker *worker) if (data.gid != getegid()) { ret = setegid(data.gid); if (ret < 0) { + sendret._error = true; + sendret._errno = errno; PERROR("setegid"); goto write_return; } @@ -535,6 +537,8 @@ int handle_one_cmd(struct run_as_worker *worker) if (data.uid != prev_euid) { ret = seteuid(data.uid); if (ret < 0) { + sendret._error = true; + sendret._errno = errno; PERROR("seteuid"); goto write_return; }