llvm-project/lldb/tools
Jason Molenda 878ae01889 This patch stops lldb from loading a .lldbinit file from the current
working directory by default -- a typical security problem that we
need to be more conservative about.

It adds a new target setting, target.load-cwd-lldbinit which may
be true (always read $cwd/.lldbinit), false (never read $cwd/.lldbinit)
or warn (warn if there is a $cwd/.lldbinit and don't read it).  The
default is set to warn.  If this is met with unhappiness, we can look
at changing the default to true (to match current behavior) on a 
different platform.

This does not affect reading of ~/.lldbinit - that will still be read,
as before.  If you run lldb in your home directory, it will not warn
about the presence of a .lldbinit file there.

I had to add two SB API - SBHostOS::GetUserHomeDirectory and 
SBFileSpec::AppendPathComponent - for the lldb driver code to be
able to get the home directory path in an OS neutral manner.

The warning text is

There is a .lldbinit file in the current directory which is not being read.
To silence this warning without sourcing in the local .lldbinit,
add the following to the lldbinit file in your home directory:
    settings set target.load-cwd-lldbinit false
To allow lldb to source .lldbinit files in the current working directory,
set the value of this variable to true.  Only do so if you understand and
accept the security risk.

<rdar://problem/24199163> 

llvm-svn: 261280
2016-02-19 00:05:17 +00:00
..
argdumper Rename argdumper to lldb-argdumper 2015-10-29 05:07:12 +00:00
compact-unwind Fix a variety of typos. 2015-06-18 05:27:05 +00:00
darwin-debug Fix darwin-debug installation in cmake (OS X) 2015-02-06 18:13:10 +00:00
darwin-threads Add support for one API used to detect if a process 2015-11-05 23:04:57 +00:00
debugserver Add a missing break. 2016-02-10 01:33:58 +00:00
driver This patch stops lldb from loading a .lldbinit file from the current 2016-02-19 00:05:17 +00:00
install-headers add back an Xcode-specific Makefile for header installation 2016-01-28 22:34:36 +00:00
lldb-mi Show real error message in -data-evaluate-expression 2016-02-08 10:04:51 +00:00
lldb-perf Cleanup how we listen for process events by using the broadcaster class name instead of having to catch each process instance as it comes alive. 2014-08-18 21:09:50 +00:00
lldb-server Add new option to lldb-server to display its version 2016-02-10 10:35:48 +00:00
CMakeLists.txt [cmake] Build lldb-server on Darwin, set dep on FreeBSD. 2015-09-17 18:35:33 +00:00