Revert "shmctl(IPC_RMID): fix wrong owner/creator checking"
This reverts commit 8b5b075f4c.
The reverted commit modifies IPC_SET instead of IPC_RMID.
This commit is contained in:
@@ -51,7 +51,6 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <mc_perf_event.h>
|
#include <mc_perf_event.h>
|
||||||
#include <march.h>
|
#include <march.h>
|
||||||
#include <process.h>
|
|
||||||
|
|
||||||
/* Headers taken from kitten LWK */
|
/* Headers taken from kitten LWK */
|
||||||
#include <lwk/stddef.h>
|
#include <lwk/stddef.h>
|
||||||
@@ -3809,8 +3808,7 @@ SYSCALL_DECLARE(shmctl)
|
|||||||
dkprintf("shmctl(%#x,%d,%p): lookup: %d\n", shmid, cmd, buf, error);
|
dkprintf("shmctl(%#x,%d,%p): lookup: %d\n", shmid, cmd, buf, error);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
if (!has_cap_sys_admin(thread)
|
if ((obj->ds.shm_perm.uid != proc->euid)
|
||||||
&& (obj->ds.shm_perm.uid != proc->euid)
|
|
||||||
&& (obj->ds.shm_perm.cuid != proc->euid)) {
|
&& (obj->ds.shm_perm.cuid != proc->euid)) {
|
||||||
shmobj_list_unlock();
|
shmobj_list_unlock();
|
||||||
dkprintf("shmctl(%#x,%d,%p): -EPERM\n", shmid, cmd, buf);
|
dkprintf("shmctl(%#x,%d,%p): -EPERM\n", shmid, cmd, buf);
|
||||||
|
|||||||
Reference in New Issue
Block a user