Linux: update process uid on change

Always check if the user of a process changed, e.g. by using setuid(2).
This commit is contained in:
Christian Göttsche
2021-06-09 11:13:39 +02:00
committed by BenBE
parent faabbaa71e
commit 9114cf6ea3
2 changed files with 11 additions and 7 deletions

View File

@ -968,6 +968,7 @@ void Process_init(Process* this, const Settings* settings) {
this->show = true;
this->updated = false;
this->cmdlineBasenameEnd = -1;
this->st_uid = (uid_t)-1;
if (Process_getuid == (uid_t)-1) {
Process_getuid = getuid();