While reading the manual page of setresuid()
a question arose about the purpose of Real UID.
As mentioned in the man page:
setresuid() sets the real user ID, the effective user ID, and the saved set-user-ID of the calling process. Unprivileged user processes may change the real UID, effective UID, and saved set-user-ID, each to one of: the current real UID, the current effective UID or the current saved set-user-ID.
Thus, unless I'm missing something, using setresuid()
I can always set the Real UID of a process to be as its Effective UID. Therefore I would like to ask what's the purpose of Real UID while it can be set easily to the Effective UID? Doesn't the existence of Effective UID make Real UID redundant?