Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Michael Snyder <msnyder@specifix.com>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, gdb-patches@sourceware.org
Subject: Re: [patch] fileio.exp FAILs if run as root
Date: Tue, 11 Dec 2007 17:54:00 -0000	[thread overview]
Message-ID: <20071211174626.GA15092@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <1197393212.32169.63.camel@localhost.localdomain>

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


  reply	other threads:[~2007-12-11 17:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-08 18:58 Jan Kratochvil
2007-12-08 19:13 ` Mark Kettenis
2007-12-09  1:19   ` Jan Kratochvil
2007-12-11 17:46     ` Michael Snyder
2007-12-11 17:54       ` Jan Kratochvil [this message]
2007-12-11 18:38         ` Daniel Jacobowitz
2007-12-12 16:26           ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071211174626.GA15092@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=msnyder@specifix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox