What is a saved-set ID?

The so-called saved-set IDs are a convenience feature; the OS is able to save the process's initial effective user id (EUID) value. How does it help? This allows us to switch from the original EUID value the process starts with to, say, an unprivileged normal value (we'll cover how exactly in a moment), and then from the current privileged state back to that saved EUID value (via the seteuid(2) system call); thus, the initially saved EUID is called the saved-set ID.

In effect, we can on demand switch back and forth between a privileged and unprivileged state for our process!

After we cover a bit more material, an example will help make things clear.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset