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


> 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. What we need, I think, is a way to tie
the build to the data directory in a way that would be very very
hard to forge, like keeping a signature of one of the files in the
data directory - but for that to work, we'd need something to be
random in that file. And then exclude that file from being installed.
Once we have that, we can modify GDB to check ./data-directory/ for
the special file before setting the data-directory...

But beyond this technical aspect, I am reluctant to add a mode to GDB
that would then become useless to 99% of the people once GDB is properly
installed. I don't think that the convenience it provides is important
enough to justify it.

That being said: I am not opposed to this idea at all. If people
find a way to implement this and gets approved, that's absolutely OK
with me!

-- 
Joel


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