Bash snippets

From vegard.wiki
Revision as of 22:25, 13 December 2019 by Vegard (talk | contribs) (add category)
Jump to navigation Jump to search

Adding to the search path

# https://stackoverflow.com/a/9631350/1697183
export LD_LIBRARY_PATH="/foo/bar${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"

This is more secure than plain appending, which can create empty components (e.g. a trailing ":") which are interpreted as "current directory" and lead to DLL search order hijacking.