Re: LOGNAME, USER, and get-uid; NIS
Lassi Kortela 13 Aug 2019 11:33 UTC
> Sorry if I wasn't clear, I only did one set-uid, and it indeed
> changed the effective uid to 1000. The problem is that the real
> uid [...] also changed to 1000.
The setuid() function sets the real and effective user IDs and the saved
set-user-ID of the current process to the specified value.
There's a separate seteuid() syscall (note the "e") to set only the
effective user ID.
Ditto for setgid() and setegid().