This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] fileio.exp FAILs if run as root


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 <jan.kratochvil@redhat.com>
> > > > 
> > > > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]