From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15060 invoked by alias); 11 Dec 2007 17:46:44 -0000 Received: (qmail 15051 invoked by uid 22791); 11 Dec 2007 17:46:43 -0000 X-Spam-Check-By: sourceware.org Received: from pauline.vellum.cz (HELO pauline.vellum.cz) (89.250.243.234) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 11 Dec 2007 17:46:35 +0000 Received: from host0.dyn.jankratochvil.net (localhost.localdomain [127.0.0.1]) by pauline.vellum.cz (8.12.11.20060308/8.12.11) with ESMTP id lBBHkUJX015434; Tue, 11 Dec 2007 18:46:30 +0100 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.2/8.14.1) with ESMTP id lBBHkTpZ015346; Tue, 11 Dec 2007 18:46:30 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.2/8.14.2/Submit) id lBBHkRUM015345; Tue, 11 Dec 2007 18:46:27 +0100 Date: Tue, 11 Dec 2007 17:54:00 -0000 From: Jan Kratochvil To: Michael Snyder Cc: Mark Kettenis , gdb-patches@sourceware.org Subject: Re: [patch] fileio.exp FAILs if run as root Message-ID: <20071211174626.GA15092@host0.dyn.jankratochvil.net> References: <20071208181422.GA10275@host0.dyn.jankratochvil.net> <200712081858.lB8Iw5pn014666@brahms.sibelius.xs4all.nl> <20071208191320.GA11395@host0.dyn.jankratochvil.net> <1197393212.32169.63.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1197393212.32169.63.camel@localhost.localdomain> User-Agent: Mutt/1.5.17 (2007-11-01) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00161.txt.bz2 On Tue, 11 Dec 2007 18:13:32 +0100, Michael Snyder wrote: > On Sat, 2007-12-08 at 20:13 +0100, Jan Kratochvil wrote: > > On Sat, 08 Dec 2007 19:58:05 +0100, Mark Kettenis wrote: > > > > Date: Sat, 8 Dec 2007 19:14:22 +0100 > > > > From: Jan Kratochvil > > > > > > > > Hi, > > > > > > > > if you run gdb.base/fileio.exp as UID 0 it will print: > > > > FAIL: gdb.base/fileio.exp: Open for write but no write permission returns EACCES > > > > FAIL: gdb.base/fileio.exp: Unlinking a file in a directory w/o write access returns EACCES > > > > > > People running the testsuite as root deserve what they get. I don't > > > think we should complicate our code to make that possible, especially > > > if it involves calling setuid() which is notoriously unportable. > > > > OK, this is the other possibility I was considering. > > Clever -- but should it be a warning instead of a terminate? > > Somebody might have a legitimate reason to run as root, > even if we can't think of it right now. This my patch http://sources.redhat.com/ml/gdb-patches/2007-12/msg00137.html was more a demonstration that while running the testsuite as 'root' may be wrong it happens and it probably should not be disabled. This is repeating the history, warnings are not enough: http://sources.redhat.com/ml/gdb-patches/2007-01/threads.html#00326 There are various warnings around, at least I see now on the console WARNING: Couldn't find the global config file. but apparently nobody cares (do you also see this warning?). I had to start resolving the testsuite regression to find out the reason is the 'root' run. I am sure I would ignore another warning message appearing during the start. There are multiple possibilities: (1) Keeping there setuid() before somebody complains it does not work. http://sources.redhat.com/ml/gdb-patches/2007-12/msg00135.html (2) Pointing me/anyone at the system where this setuid() code does not work. (3) Skipping (not FAILing) the two tests known they FAIL on the 'root' run. (4) Disabling running the testsuite as 'root'. (5) Giving just a warning during the start. (6) I am too dumb to become a GDB user. more? (4) and (5) are hopefully out of the question now. Regards, Jan