patch-2.1.100 linux/ipc/sem.c
Next file: linux/ipc/shm.c
Previous file: linux/ipc/msg.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Wed May 6 10:56:06 1998
- Orig file:
v2.1.99/linux/ipc/sem.c
- Orig date:
Sun Dec 21 17:11:08 1997
diff -u --recursive --new-file v2.1.99/linux/ipc/sem.c linux/ipc/sem.c
@@ -482,7 +482,8 @@
goto out;
break;
case IPC_RMID:
- if (current->euid == ipcp->cuid || current->euid == ipcp->uid || suser()) {
+ if (current->euid == ipcp->cuid ||
+ current->euid == ipcp->uid || capable(CAP_SYS_ADMIN)) {
freeary (id);
err = 0;
goto out;
@@ -540,7 +541,8 @@
update_queue(sma);
break;
case IPC_SET:
- if (current->euid == ipcp->cuid || current->euid == ipcp->uid || suser()) {
+ if (current->euid == ipcp->cuid ||
+ current->euid == ipcp->uid || capable(CAP_SYS_ADMIN)) {
ipcp->uid = tbuf.sem_perm.uid;
ipcp->gid = tbuf.sem_perm.gid;
ipcp->mode = (ipcp->mode & ~S_IRWXUGO)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov