Setgui(), Setuid() calls in xio-progcall.c were useless

This commit is contained in:
Gerhard Rieger 2021-10-31 18:41:25 +01:00
parent 25cef1c540
commit de80e962a6
2 changed files with 2 additions and 10 deletions

View file

@ -54,6 +54,8 @@ Corrections:
handling of ancilliary messages, so it is able to analyze ICMP error handling of ancilliary messages, so it is able to analyze ICMP error
packets (Linux only?) packets (Linux only?)
Setgui(), Setuid() calls in xio-progcall.c were useless.
Testing: Testing:
Prevent the TIMESTAMP tests from sporadically failing due do seconds Prevent the TIMESTAMP tests from sporadically failing due do seconds
overflow overflow

View file

@ -417,9 +417,6 @@ int _xioopen_foxec(int xioflags, /* XIO_RDONLY etc. */
} }
} }
if (!withfork || pid == 0) { /* child */ if (!withfork || pid == 0) { /* child */
uid_t user;
gid_t group;
if (withfork) { if (withfork) {
/* The child should have default handling for SIGCHLD. */ /* The child should have default handling for SIGCHLD. */
/* In particular, it's not defined whether ignoring SIGCHLD is inheritable. */ /* 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); applyopts(-1, *copts, PH_LATE2);
} }
_xioopen_setdelayeduser(); _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) { if (withstderr) {
*duptostderr = fdo; *duptostderr = fdo;
} else { } else {