1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Fix psctl(2) not setting uid, euid, gid, and egid.

This commit is contained in:
Jonas 'Sortie' Termansen 2021-02-11 20:36:37 +01:00
parent fff849b151
commit aadeef6a7c

View file

@ -115,6 +115,12 @@ int sys_psctl(pid_t pid, int request, void* ptr)
psst.init_prev = ptable->Prev(pid);
psst.init_next = ptable->Next(pid);
psst.init_first = pid == 1 ? 1 : -1;
kthread_mutex_lock(&process->idlock);
psst.uid = process->uid;
psst.euid = process->euid;
psst.gid = process->gid;
psst.egid = process->egid;
kthread_mutex_unlock(&process->idlock);
kthread_mutex_lock(&process->threadlock);
psst.status = process->exit_code;
kthread_mutex_unlock(&process->threadlock);