path-util: teach find_executable_full how to look into the root directory
authorMaanya Goenka <t-magoenka@microsoft.com>
Wed, 4 Aug 2021 18:59:45 +0000 (11:59 -0700)
committerMaanya Goenka <t-magoenka@microsoft.com>
Tue, 10 Aug 2021 17:14:01 +0000 (10:14 -0700)
commit36f4af05680d0f8f67b870bf72241d7d2fefd91b
tree9c32df8ae1dd88800bf92331de6bd308738e1f55
parente5ea5c3a17c6b8916c35abb665fd926d2d9ff41b
path-util: teach find_executable_full how to look into the root directory

When the root parameter in find_executable_full is set, chase_symlinks prefixes this root
to every check of the path name to find the complete path of the execuatble in case the
path provided is not absolute. This is only done for the non NULL root because otherwise
the chase_symlinks function would alter the behavior of some of the callers which would
in turn alter the outputs in a way that is undesirable. The find_execuatble_full function is
invoked by the verify_executable function in analyze-verify.
src/analyze/analyze-verify.c
src/basic/path-util.c
src/basic/path-util.h
src/core/execute.c
src/test/test-path-util.c