treewide: Fix unsafe concatenation of $LD_LIBRARY_PATH, round 2

Naive concatenation of $LD_LIBRARY_PATH can result in an empty
colon-delimited segment; this tells glibc to load libraries from the
current directory, which is definitely wrong, and may be a security
vulnerability if the current directory is untrusted.  (See #67234, for
example.)  Fix this throughout the tree.

Followup to #76804.  Fixes #144646.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2021-11-04 16:14:48 -07:00
parent b67e752c29
commit e12f4db556
7 changed files with 9 additions and 9 deletions
@@ -13,7 +13,7 @@ buildPythonPackage rec {
# some functionality to work (inparticular, pybel).
# see https://openbabel.org/docs/dev/Installation/install.html
BABEL_LIBDIR = "${openbabel}/lib/openbabel/3.1.0";
LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${openbabel}/lib";
LD_LIBRARY_PATH = "${openbabel}/lib";
doCheck = false;
pythonImportsCheck = [ "openbabel" ];