Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] auto-load safe-path reset back by set ""
Date: Mon, 23 Apr 2012 04:53:00 -0000	[thread overview]
Message-ID: <20120423023734.GA23871@host2.jankratochvil.net> (raw)
In-Reply-To: <CADPb22RcUE-J1js2PRfFU6WxoDRwUgXEoorYYL5gpwKU0dppSg@mail.gmail.com>

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


  reply	other threads:[~2012-04-23  2:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-22 16:52 Jan Kratochvil
2012-04-22 21:26 ` Eli Zaretskii
2012-04-23 18:13   ` [doc commit] auto-load: Remove trailing @dots [Re: [patch] auto-load safe-path reset back by set ""] Jan Kratochvil
2012-04-23 18:02     ` [doc commit#2] " Jan Kratochvil
2012-04-23 22:52   ` [patch] auto-load safe-path reset back by set "" Jan Kratochvil
2012-04-24  2:53     ` Eli Zaretskii
2012-04-24  3:25       ` Jan Kratochvil
2012-05-06 15:32         ` [commit] " Jan Kratochvil
2012-04-23  2:38 ` Doug Evans
2012-04-23  4:53   ` Jan Kratochvil [this message]
2012-04-24  0:58   ` [patch] auto-load safe-path default=$ddir/auto-load [Re: [patch] auto-load safe-path reset back by set ""] Jan Kratochvil
2012-05-06 16:20     ` obsolete: " 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=20120423023734.GA23871@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /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