Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org, Eli Zaretskii <eliz@gnu.org>
Subject: [doc patch] auto-load: Make more set auto-load safe-path references  [Re: [patch#3 5/8] set auto-load safe-path]
Date: Wed, 09 May 2012 18:26:00 -0000	[thread overview]
Message-ID: <20120509182555.GA16482@host2.jankratochvil.net> (raw)
In-Reply-To: <20120509042129.GA24867@adacore.com>

Hi Joel,

On Wed, 09 May 2012 06:21:29 +0200, Joel Brobecker wrote:
> In my opinion, we should definitely mention the "auto-load safe-path"
> setting at the very beginning of the auto-load section, before we start
> talking about the various kinds of files that can be automatically
> loaded. And I also think that it would be beneficial to add a reference
> to the safe-path setting in all "set auto-load ..." commands, to make
> sure that people who quickly search the documentation do not miss the
> important fact that setting "auto-load local-gdbinit" to "on" might not
> be sufficient.

attached.


> And lastly, it would have been nice if, after reading the documentation,
> the user could have had a sense of what policy GDB implements by default.
> For instance, GDB's default policy is to enable auto-loading of all
> files, but only from trusted directories specified via the "auto-load
> safe-path" setting.

There is already that paragraph (in Node: Auto-loading safe path):

   Setting this variable to `/' disables this security protection,
corresponding GDB configuration option is
`--without-auto-load-safe-path'.  This variable is supposed to be set
to the system directories writable by the system superuser only.  Users
can add their source directories in init files in their home
directories (*note Home Directory Init File::).  See also deprecated
init file in the current directory (*note Init File in the Current
Directory during Startup::).

Do you find it insufficient?


Thanks,
Jan


gdb/doc
2012-05-09  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.texinfo (Auto-loading, Init File in the Current Directory)
	(libthread_db.so.1 file, objfile-gdb.gdb file, objfile-gdb.py file)
	(dotdebug_gdb_scripts section): Add reference
	to 'Auto-loading safe path'.

--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -20973,6 +20973,10 @@ without being explicitly told so by the user.  We call this feature
 results or introduce security risks (e.g., if the file comes from untrusted
 sources).
 
+Notice loading of these associated files (including the local @file{.gdbinit}
+file) requires accordingly configured @code{auto-load safe-path}
+(@pxref{Auto-loading safe path}).
+
 For these reasons, @value{GDBN} includes commands and options to let you
 control when to auto-load files and which files should be auto-loaded.
 
@@ -21110,6 +21114,9 @@ By default, @value{GDBN} reads and executes the canned sequences of commands
 from init file (if any) in the current working directory,
 see @ref{Init File in the Current Directory during Startup}.
 
+Notice loading of this local @file{.gdbinit} file also requires accordingly
+configured @code{auto-load safe-path} (@pxref{Auto-loading safe path}).
+
 @table @code
 @anchor{set auto-load local-gdbinit}
 @kindex set auto-load local-gdbinit
@@ -21146,6 +21153,9 @@ libraries have to be trusted in general.  In all other cases of
 auto-load libthread-db} is enabled before trying to open such thread debugging
 library.
 
+Notice loading of this debugging library also requires accordingly configured
+@code{auto-load safe-path} (@pxref{Auto-loading safe path}).
+
 @table @code
 @anchor{set auto-load libthread-db}
 @kindex set auto-load libthread-db
@@ -21173,6 +21183,9 @@ for each such library print list of inferior @var{pid}s using it.
 canned sequences of commands (@pxref{Sequences}), as long as @samp{set
 auto-load gdb-scripts} is set to @samp{on}.
 
+Notice loading of this script file also requires accordingly configured
+@code{auto-load safe-path} (@pxref{Auto-loading safe path}).
+
 For more background refer to the similar Python scripts auto-loading
 description (@pxref{objfile-gdb.py file}).
 
@@ -25463,7 +25476,10 @@ then @value{GDBN} will look for @var{script-name} in all of the
 directories mentioned in the value of @code{debug-file-directory}.
 
 Finally, if this file does not exist, then @value{GDBN} will look for
-@var{script-name} file in all of the directories specified by:
+@var{script-name} file in all of the directories as specified below.
+
+Notice loading of this script file also requires accordingly configured
+@code{auto-load safe-path} (@pxref{Auto-loading safe path}).
 
 @table @code
 @anchor{set auto-load scripts-directory}
@@ -25539,6 +25555,9 @@ DEFINE_GDB_SCRIPT ("my-app-scripts.py")
 
 The script name may include directories if desired.
 
+Notice loading of this script file also requires accordingly configured
+@code{auto-load safe-path} (@pxref{Auto-loading safe path}).
+
 If the macro is put in a header, any application or library
 using this header will get a reference to the specified script.
 


  parent reply	other threads:[~2012-05-09 18:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03 19:17 [patch#3 5/8] set auto-load safe-path Jan Kratochvil
2012-05-09  4:22 ` Joel Brobecker
2012-05-09  5:29   ` Eli Zaretskii
2012-05-09  5:54   ` Jan Kratochvil
2012-05-09 12:21     ` Joel Brobecker
2012-05-09 18:26   ` Jan Kratochvil [this message]
2012-05-09 18:49     ` [doc patch] auto-load: Make more set auto-load safe-path references [Re: [patch#3 5/8] set auto-load safe-path] Eli Zaretskii
2012-05-09 18:58       ` Jan Kratochvil
2012-05-09 19:58     ` Joel Brobecker
2012-05-11 18:27       ` [commit] " 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=20120509182555.GA16482@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --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