lkml.org 
[lkml]   [1996]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Kill system call
Date
>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


\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.073 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site