Re: [PATCH] getrusage sucks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sad, 2005-11-12 at 00:08 +0100, Claudio Scordino wrote:
> On Saturday 12 November 2005 00:23, Alan Cox wrote:
> > On Gwe, 2005-11-11 at 23:38 +0100, Claudio Scordino wrote:
> > > +                if ((current->euid != tsk->euid) &&
> > > +                (current->euid != tsk->uid)) {
> > > +                        read_unlock(&tasklist_lock);
> > > +                        return -EINVAL;
> >
> > Would be -EPERM also wants a 'privilege' check. Not sure which would be
> > best here - CAP_SYS_ADMIN seems to be the 'default' used
> 
> I would say -EPERM. Any other comment about the patch ?

Looks fine to me otherwise. Allowing if CAP_SYS_ADMIN is set fixes the
case where root wants to see anything, rest looks clean and sensible


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux