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] auto-load safe-path reset back by set ""


On Sun, 22 Apr 2012 23:26:16 +0200, Doug Evans wrote:
> A thought occurred to me regarding the default value of auto-load-path
> = ${prefix}.
> For a typical value of /usr, it doesn't give as much protection as it could.
> E.g. /usr/tmp, /usr/local/tmp

I never noticed /usr/tmp, this is a real problem.


> (or possibly anything in /usr/local).

This should not be a problem, /usr/local has superuser-only write permissions.


> So I was wondering if we really want security to be on by default,

I do not think it is so important for custom GDB builds and neither for
Fedora/RHEL when I can set it up properly but I have some doubts distros in
general will set it at all if the default will remain insecure.


> should the default value be gdb's data-directory (e.g.,
> $prefix/share/gdb) + $exec_prefix/lib{,32,64} + ???

I was thinkink about making the default '$prefix:-$prefix/tmp' (sure with
a new GDB feature to remove safety from sub-trees by '-').

But you are right $prefix/share/gdb may be enough as packages use / should use
$prefix/share/gdb/auto-load/ for their *-gdb.py hooks.  In such case I do not
know why to add also that $exec_prefix/lib{,32,64} + ???.


> Plus, it seems like at least data-directory should be relocatable.
> Implementing this might be cumbersome unless data-directory was
> represented as something like "$ddir".  Or maybe represent $prefix as
> $pdir, etc..  There is precedent.  Whether to apply that here - I'm
> just raising the issue, I'm not sure myself.

$pdir from libthread-db-search-path is different, it should not be overloaded
to a different meaning here.  But $ddir for data-directory looks correct to
me.


Thanks,
Jan


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