[LTP] [PATCH 4/5] syscalls/chmod05: Use new ltp library

Cyril Hrubis
2018-11-06T16:01:19Z

Hi!
> > -void cleanup(void)
> > -{
> > - if (setegid(0) == -1)
> > - tst_resm(TWARN | TERRNO, "setegid(0) failed");
> > - if (seteuid(0) == -1)
> > - tst_resm(TWARN | TERRNO, "seteuid(0) failed");
> > -
>
> It looks like I need to do this in some cleanup function for the new test.
> Otherwise the library cleanup won't be able to delete the tmpdir. Let me
> rework this..

Actually the temporary directory cleanup in the new library is executed
from the parent process, the actuall test is executed from a forked
child so it shouldn't matter what euid and egid the child process ends
up with.

--
Cyril Hrubis
chrubis@suse.cz