aboutsummaryrefslogtreecommitdiff
path: root/libc/bionic/__bionic_get_shell_path.cpp
Commit message (Collapse)AuthorAgeFilesLines
* system(3) uses /bin/sh when built for hostJiyong Park2020-10-261-0/+5
| | | | | | | | | /system/bin/sh exists only on Android. When Bionic is built for the host, use the standard /bin/sh. Bug: 159685774 Test: run aosp_cf_arm64_phone on rockpi4 Change-Id: Idf4028c134abc128f203fc4d3be591f06b8fe8ff
* Fix internal uses of _PATH_BSHELL.Elliott Hughes2019-03-251-1/+3
| | | | | | | | | | We regressed on this recently: code under the upstream-* directories has _PATH_BSHELL defined as a call to __bionic_get_shell_path(). In our own code, we may as well just call it directly. Bug: https://issuetracker.google.com/129030706 Test: ran tests Change-Id: Ic2423f521272be95e67f94771772fe8072636ef0
* Use treble_linker_namespace instead of treble.Steven Moreland2017-12-131-1/+1
| | | | | | | | More specific. Treble is being removed. Bug: 62019611 Test: manual Change-Id: I94c21c6a5cb6a258bfb36a0b7da23abdc73a67fb
* For devices which are not treble enabled, return the system shell.Jayant Chowdhary2017-09-071-7/+13
| | | | | | | | | | | | | | | | For treble enabled devices, still return the appropriate shell depending on whether the process is a vendor process or a system one. Test: Manual testing: on a bullhead device, ran test programs from /vendor/bin which used popen() and system(). The calls succeeded. Bug: 65054230 Bug: 64516799 Merged-In: I15dfdbb107cfca7c0f92f337c9bb46b9876eb38e Change-Id: I15dfdbb107cfca7c0f92f337c9bb46b9876eb38e (cherry picked from commit 1e52871773505edf70d10a3af7b003e9320ef6a3)
* libc: Add support to allow library calls to find appropriate shell ↵Sandeep Patil2017-08-221-0/+51
executable for a process Library calls like system() and popen() invoke the shell executable pointed to by '_PATH_BSHELL' in order to run the command passed into the function. The _PATH_BSHELL points to /system/bin/sh by default and thus breaks any vendor process trying to use system() / popen(), as they are denied access to system shell by selinux. This CL make necessary changes, so the implmentations of system() and popen() can use the appropriate shell (e.g. /vendor/bin/sh for processes running out of /vendor partition). Also, changes the implementation of system() and popen(). Bug: 64832610 Test: Manual, Using a test program running from /system/bin and /vendor/bin to ensure correct shell is being used. Change-Id: Ie7168d69decb1ae98284446ae7db34dec930dc33 Merged-In: Ie7168d69decb1ae98284446ae7db34dec930dc33 Signed-off-by: Sandeep Patil <sspatil@google.com> (cherry picked from commit aa3e32422cc7089b9b15976f2651a58840d95e4f)