On Mon, Aug 28, 2006 at 04:39:12PM -0500, Serge E. Hallyn wrote: > +int cap_task_kill(struct task_struct *p, struct siginfo *info, > + int sig, u32 secid) > +{ > + if (info != SEND_SIG_NOINFO && (is_si_special(info) || SI_FROMKERNEL(info))) > + return 0; > + > + if (secid) > + /* > + * Signal sent as a particular user. > + * Capabilities are ignored. May be wrong, but it's the > + * only thing we can do at the moment. > + * Used only by usb drivers? > + */ > + return 0; > + if (current->uid == 0 || current->euid == 0) > + return 0; uid/euid checks feel out of place in the capabilities code. > + if (capable(CAP_KILL)) > + return 0; > + if (cap_issubset(p->cap_permitted, current->cap_permitted)) > + return 0; > + > + return -EPERM; > +} Thanks Serge
Attachment:
pgpuIEDFkRsoF.pgp
Description: PGP signature
- Follow-Ups:
- Re: [RFC] [PATCH] file posix capabilities
- From: "Serge E. Hallyn" <[email protected]>
- Re: [RFC] [PATCH] file posix capabilities
- References:
- Re: [RFC] [PATCH] file posix capabilities
- From: [email protected] (Eric W. Biederman)
- Re: [RFC] [PATCH] file posix capabilities
- From: Nicholas Miell <[email protected]>
- Re: [RFC] [PATCH] file posix capabilities
- From: "Serge E. Hallyn" <[email protected]>
- Re: [RFC] [PATCH] file posix capabilities
- From: Stephen Smalley <[email protected]>
- Re: [RFC] [PATCH] file posix capabilities
- From: "Serge E. Hallyn" <[email protected]>
- Re: [RFC] [PATCH] file posix capabilities
- From: Stephen Smalley <[email protected]>
- Re: [RFC] [PATCH] file posix capabilities
- From: Joshua Brindle <[email protected]>
- Re: [RFC] [PATCH] file posix capabilities
- From: Stephen Smalley <[email protected]>
- Re: [RFC] [PATCH] file posix capabilities
- From: "Serge E. Hallyn" <[email protected]>
- Re: [RFC] [PATCH] file posix capabilities
- From: "Serge E. Hallyn" <[email protected]>
- Re: [RFC] [PATCH] file posix capabilities
- Prev by Date: Re: The 3G (or nG) Kernel Memory Space Offset
- Next by Date: Re: [PATCH 1/2] NOMMU: Set BDI capabilities for /dev/mem and /dev/kmem
- Previous by thread: Re: [RFC] [PATCH] file posix capabilities
- Next by thread: Re: [RFC] [PATCH] file posix capabilities
- Index(es):