This is the mail archive of the gdb-patches@sources.redhat.com 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: RFC: Check permissions of .gdbinit files


On Mon, May 30, 2005 at 03:46:17PM -0400, Nathan J. Williams wrote:
> Daniel Jacobowitz <drow@false.org> writes:
> 
> > > I think the "owned by a different user" change is problematic. I've
> > > used build systems that autogenerated .gdbinit files in the build
> > > tree, and it would be entirely sensible for one developer to go and
> > > debug another developer's build.
> > 
> > Well that's the whole point.  You'll get a warning; would you be
> > happier if the warning explicitly suggested "source .gdbinit"?
> 
> I guess. I think I don't agree that this is a problem that needs
> solving, fundamentally.

I'm not completely sure that I disagree.  But it's worth talking about
at least.  Here's the problem case:

<user> Foo is broken!
<root> What do you want me to do about it?
<user> Well, there's a core dump in /blah.
<root> OK

# cd /blah
# gdb /bin/foo core
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux".
Hi!
You have been owned.
(gdb)

I wouldn't expect GDB to execute code in that case, but it does.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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