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] Also install data-directory into the build directory as computed by relocate_gdb_directory


On Thu, Oct 4, 2012 at 7:48 AM, Doug Evans <dje@google.com> wrote:
> On Thu, Oct 4, 2012 at 6:49 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>>> Why not?  Aren't there specific directories and/or files near the GDB
>>> executable in this case?
>>
>> I have a feeling that this would open the door allowing attackers
>> to setup GDB to execute unwanted code if we make it easy to reproduce
>> the same environment and place GDB in a mode where it thinks it is
>> inside a build directory.
>
> auto-load safe-path isn't circumvented.

Hmm, I take that back, since the plan was to set a different default
value for data-directory.

I wonder if it's possible to put a solution in ~/.gdbinit.
gdb hackers already have to do something if they want gdb-gdb.gdb
auto-loaded (assuming they don't do something at configure time).
[If we need to extend the Python API a bit, that'd be ok with me.]
~/.gdbinit is processed before the command line args.


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