Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751302AbVKKWxE (ORCPT ); Fri, 11 Nov 2005 17:53:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751303AbVKKWxD (ORCPT ); Fri, 11 Nov 2005 17:53:03 -0500 Received: from clock-tower.bc.nu ([81.2.110.250]:25045 "EHLO lxorguk.ukuu.org.uk") by vger.kernel.org with ESMTP id S1751302AbVKKWxC (ORCPT ); Fri, 11 Nov 2005 17:53:02 -0500 Subject: Re: [PATCH] getrusage sucks From: Alan Cox To: Claudio Scordino Cc: "Magnus Naeslund(f)" , "Hua Zhong (hzhong)" , linux-kernel@vger.kernel.org, kernelnewbies@nl.linux.org, David Wagner In-Reply-To: <200511112338.20684.cloud.of.andor@gmail.com> References: <75D9B5F4E50C8B4BB27622BD06C2B82BCF2FD4@xmb-sjc-235.amer.cisco.com> <200511110211.05642.cloud.of.andor@gmail.com> <1131715816.3174.15.camel@localhost.localdomain> <200511112338.20684.cloud.of.andor@gmail.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Fri, 11 Nov 2005 23:23:53 +0000 Message-Id: <1131751433.3174.50.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 639 Lines: 15 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/