This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 4/6] set auto-load safe-path
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 24 Mar 2012 21:18:38 +0200
- Subject: Re: [patch 4/6] set auto-load safe-path
- References: <20120324183946.GE26662@host2.jankratochvil.net>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Sat, 24 Mar 2012 19:39:46 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> +set auto-load safe-path <dir1>[:<dir2>...]
> +show auto-load safe-path
> + Sets a list of directories safe to hold auto-loaded files.
Set a list of directories from which it is safe to auto-load files.
or
Set a list of directories that are safe for storing auto-load files.
> +Set the directories safe to hold auto-loaded files."), _("\
> +Show the directories safe to hold auto-loaded files."), _("\
Same here.
> +@node auto-load safe-path
> +@subsubsection Security restriction for auto-loading
> +@cindex auto-load safe-path
> +
> +As the files of inferior can come from untrusted source (such as submitted by
> +an application user) @value{GDBN} does not always load any files automatically.
> +
> +This setting should contain so called canonical filenames, after any symbolic
> +links, current and parent directories have been resolved. Both the
> +@samp{auto-load safe-path} setting and the scripts being verified are
> +canonicalized first for their matching.
> +
> +@table @code
> +@kindex set auto-load safe-path
> +@item set auto-load safe-path @var{directories}
> +Set the list of directories (and their subdirectories) trusted for automatic
> +loading and execution of scripts. The list of directories uses directory
> +separator as its delimiter. You can also enter a specific trusted file.
> +
> +@kindex show auto-load safe-path
> +@item show auto-load safe-path
> +Show the list of directories (and their subdirectories) trusted for automatic
> +loading and execution of scripts.
> +@end table
> +
> +Setting this variable to an empty string disables this security protection.
> +This variable is supposed to be set to the system directories writable by the
> +system superuser only. Users can add their source directories in home
> +directories. See also the deprecated option @xref{local-gdbinit}.
> +
> +Be aware even downloaded source packages may contain exploit code which may get
> +executed by @value{GDBN} without explicitly running any program therein.
This text should explain what happens if an auto-load file is found in
a directory not on this list. Is it silently ignored? ignored with a
warning message? is the user prompted for permission to load it?
something else?