linux的setuid权限解释
linux权限之setUID的介绍:
stackexchange上对于使用了setuid的程序为什么不能修改其他用户代码的解释:
because at the time of password change the real user id is checked not the effective user id
对于uid和euid设置时候的一些解释和实践:
(change setuid bit: chmod u+s filename)
If you're euid is root and you change the uid, the privileges gets dropped permanently.
If effective user id is not root then saved user id is never touched and you can regain the root privilege back anytime you want in your program.
中文版本的setuid大总结: