From de80e962a6f14e18256e6e02d3701fe669383d28 Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Sun, 31 Oct 2021 18:41:25 +0100 Subject: [PATCH] Setgui(), Setuid() calls in xio-progcall.c were useless --- CHANGES | 2 ++ xio-progcall.c | 10 ---------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/CHANGES b/CHANGES index 0a5d8ef..d5be4ff 100644 --- a/CHANGES +++ b/CHANGES @@ -54,6 +54,8 @@ Corrections: handling of ancilliary messages, so it is able to analyze ICMP error packets (Linux only?) + Setgui(), Setuid() calls in xio-progcall.c were useless. + Testing: Prevent the TIMESTAMP tests from sporadically failing due do seconds overflow diff --git a/xio-progcall.c b/xio-progcall.c index bcb7d34..65cf3b3 100644 --- a/xio-progcall.c +++ b/xio-progcall.c @@ -417,9 +417,6 @@ int _xioopen_foxec(int xioflags, /* XIO_RDONLY etc. */ } } if (!withfork || pid == 0) { /* child */ - uid_t user; - gid_t group; - if (withfork) { /* The child should have default handling for SIGCHLD. */ /* In particular, it's not defined whether ignoring SIGCHLD is inheritable. */ @@ -548,13 +545,6 @@ int _xioopen_foxec(int xioflags, /* XIO_RDONLY etc. */ applyopts(-1, *copts, PH_LATE2); } _xioopen_setdelayeduser(); - /* set group before user - maybe you are not permitted afterwards */ - if (retropt_gidt(*copts, OPT_SETGID, &group) >= 0) { - Setgid(group); - } - if (retropt_uidt(*copts, OPT_SETUID, &user) >= 0) { - Setuid(user); - } if (withstderr) { *duptostderr = fdo; } else {