I got the same uid and euid even though the file belongs to root and has the suid bit set. Does anybody know how to make a test case to let getuid() and geteuid() return different results? Thanks. EDIT: I tried a C program. uid and euid are still the same. Answer Typo! should read Then the C program will
Tag: uid
is shell_exec() sub-process supposed to inherit euid?
i’m running php-cli 7.3.19 as root (on a Debian 10 Buster, linux kernel 4.19.0-8-amd64), and after using posix_seteuid() to change my euid, is sub-processes supposed to inherit my euid? i thought the answer was yes, but testing it, it seems whoami inherits my uid as it’s euid, rather than inheriting my euid as it’s euid, is that intended behavior? to