llvm-project/lldb/scripts
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
..
Python Adjust for Python-3. 2016-02-12 20:30:47 +00:00
Xcode modify Xcode build to use cmake/ninja for internal llvm/clang 2016-01-28 07:36:44 +00:00
interface This patch stops lldb from loading a .lldbinit file from the current 2016-02-19 00:05:17 +00:00
swig_bot_lib Use sub-commands instead of --mode={client,server}. 2015-12-02 19:00:52 +00:00
CMakeLists.txt Remove superseded buildSwigWrapperClasses.py and buildSwigPython.py classes 2015-11-18 22:21:47 +00:00
build-lldb-llvm-clang
buildbot.py
checkpoint-llvm.pl Fix typos. 2014-07-01 21:22:11 +00:00
disasm-gdb-remote.pl Fix typos. 2014-07-01 21:22:11 +00:00
finish-swig-wrapper-classes.sh Fixed Makefile-based install to place python packages in the LLDB install tree. 2013-12-06 23:16:23 +00:00
finishSwigWrapperClasses.py Be *stupider* about what constitutes a supported language binding. 2015-11-25 17:49:47 +00:00
generate-vers.pl Make lldb build with Makefiles on OS X. 2014-01-18 08:05:32 +00:00
get_relative_lib_dir.py Support RHEL 7 and similar systems that use architecture-specific Python lib dirs 2015-10-12 20:12:27 +00:00
install-lldb.sh
install_custom_python.py Making linking against Python simpler on Windows. 2015-04-10 22:58:56 +00:00
lldb.swig Fix non-Windows build after r252906. 2015-11-12 17:01:48 +00:00
prepare_bindings.py Be *stupider* about what constitutes a supported language binding. 2015-11-25 17:49:47 +00:00
sed-sources Fix typos. 2014-07-01 21:22:11 +00:00
shush Several improvements to the shush script 2015-01-16 23:16:22 +00:00
swig_bot.py Use sub-commands instead of --mode={client,server}. 2015-12-02 19:00:52 +00:00
use_lldb_suite.py Fix ResourceWarning about unclosed file in use_lldb_suite_root.py. 2016-01-15 22:22:35 +00:00
utilsArgsParse.py [swig] Start of pylint on python build scripts. 2015-11-05 23:57:33 +00:00
utilsDebug.py [swig] Start of pylint on python build scripts. 2015-11-05 23:57:33 +00:00
utilsOsType.py [swig] Start of pylint on python build scripts. 2015-11-05 23:57:33 +00:00
verify_api.py Added the ability to verify the LLDB API on MacOSX using a script. Usage is: 2012-08-30 21:21:24 +00:00