in reply to Not understanding the code to drop privileges in perlsec

If you don't understand the program, then you should observe what it does. As it was previously suggested, should you trace through the program and see the effects on the real and effective ids.

  • Comment on Re: Not understanding the code to drop privileges in perlsec

Replies are listed 'Best First'.
Re^2: Not understanding the code to drop privileges in perlsec
by Nocturnus (Scribe) on Feb 22, 2024 at 19:52 UTC

    Thank you very much for bothering. I've got it :-)

    But I did so and couldn't find a situation where lines 7 and 8 actually effected anything. That is, in every test I conducted, $UID was equal to $orig_UID before line 7; the same goes for $GID and $orig_GID. I have described this in my first post here.