Messages in this thread | | | From | Zefram <> | Subject | Re: Kill system call | Date | Sat, 23 Mar 1996 16:53:36 +0000 (GMT) |
| |
>Posix(1990) states: >"For a process to have permission to send a signal to a process designated by >pid, the real or effective user ID of the sending process must match the real >or effective user ID of the receiving process, unless the sending process has >appropriate privileges. If {_POSIX_SAVED_IDS} is defined, the saved set-user-ID >of the receiving process shall be checked in place of its effective user ID." > >In other words the check should look like this: > > if (!priv && ((sig != SIGCONT) || (current->session != p->session)) && > (current->euid != p->euid) && (current->euid != p->uid) > (current->uid != p->euid) && (current->uid != p->euid) && !suser()) > return -EPERM;
No, as we have saved IDs, the tests against p->euid should instead be p->suid, according to the POSIX.1 text you quote.
-zefram
| |