Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ia4fdf5b52a89bc499433550c0de8aeb50d3dea91
ssize_t readlen, writelen;
struct run_as_ret sendret = {};
run_as_fct cmd;
- uid_t prev_ruid;
- gid_t prev_rgid;
+ const uid_t prev_ruid = getuid();
+ const gid_t prev_rgid = getgid();
/*
* Stage 1: Receive run_as_data struct from the master.
goto end;
}
- prev_ruid = getuid();
- prev_rgid = getgid();
-
ret = demote_creds(prev_ruid, prev_rgid, data.uid, data.gid);
if (ret < 0) {
goto write_return;