文章目录
简介
关于seteuid,首先需要理解各个id的意思。可以参考文档
https://people.eecs.berkeley.edu/~daw/papers/setuid-login08b.pdf
Things are a bit more complicated when it comes to the corresponding process credentials. Each process has three user IDs: the real (ruid), effective (euid), and saved (suid). The real uid identifies the “owner” of the process, which is typically the executable’s invoker. The effective uid represents the identity in effect(运行时的一个时效uid), namely, the one used by the OS (operating system) for most access decisions. The saved uid stores some previous user ID, so that it can be restored (copied to the euid) at some later time with the help of set∗uid system calls. Similarly, a process has three group IDs: rgid, egid,