platform_bionic/libc
Sandeep Patil 9b1ca569db libc: Add support to allow library calls to find appropriate shell 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 aa3e32422c)
2017-08-22 10:17:28 -07:00
..
arch-arm Merge "Build support for 32-bit armv8-a" 2017-08-17 07:19:33 +00:00
arch-arm64 Split our FORTIFY implementation into libc_fortify 2017-07-24 14:20:16 -07:00
arch-common/bionic Build crtbegin with clang too. 2017-07-25 11:54:33 -07:00
arch-mips MIPS: 32/64-bit VDSO support 2017-06-01 08:50:57 -07:00
arch-mips64 Add sys/stat.h compatibility macros for old NDKs. 2017-06-14 14:03:14 -07:00
arch-x86 Remove obsolete __stack_chk_fail_local. 2017-05-23 16:43:30 -07:00
arch-x86_64 Make all the ELF relocation constants available. 2017-04-19 13:28:32 -07:00
async_safe Remove nullability specifications. 2017-08-01 13:24:40 -07:00
bionic libc: Add support to allow library calls to find appropriate shell executable for a process 2017-08-22 10:17:28 -07:00
dns Make use of the DNS query hook in the netcontext 2017-05-22 18:37:25 -04:00
include libc: Add support to allow library calls to find appropriate shell executable for a process 2017-08-22 10:17:28 -07:00
kernel Revert "Move back to the previous version of ion.h." 2017-08-01 19:32:14 +00:00
malloc_debug Improve debug malloc docs slightly for app developers. 2017-08-15 23:17:35 -07:00
private Merge "Always use CLOCK_MONOTONIC for pthreads and semaphores" 2017-08-18 19:59:26 +00:00
seccomp Create global seccomp policy. 2017-07-21 20:30:21 -07:00
stdio Finish <stdio_ext.h>. 2017-08-01 15:27:27 -07:00
stdlib Clean up __isthreaded. 2017-05-11 15:29:03 -07:00
tools Fix pattern to account for '_' prefix in syscalls 2017-08-10 11:11:00 +02:00
tzcode Fix incorrect check. 2017-04-14 12:58:56 -07:00
upstream-freebsd libc fortify: make socket.h and stdlib.h use diagnose_if 2017-08-01 22:32:15 -07:00
upstream-netbsd libc: Add support to allow library calls to find appropriate shell executable for a process 2017-08-22 10:17:28 -07:00
upstream-openbsd libc: Add support to allow library calls to find appropriate shell executable for a process 2017-08-22 10:17:28 -07:00
versioner-dependencies Revert "Revert "Run the versioner as part of the build."" 2017-03-27 13:06:45 -07:00
Android.bp libc: Add support to allow library calls to find appropriate shell executable for a process 2017-08-22 10:17:28 -07:00
Android.mk Rename Android.soong.mk to Android.mk 2016-07-11 16:54:20 -07:00
fs_config_generator.py Revert "Revert "move android_ids into bionic"" 2016-12-13 23:47:25 +00:00
libc.arm.map Finish <stdio_ext.h>. 2017-08-01 15:27:27 -07:00
libc.arm64.map Finish <stdio_ext.h>. 2017-08-01 15:27:27 -07:00
libc.map.txt Finish <stdio_ext.h>. 2017-08-01 15:27:27 -07:00
libc.mips.map Finish <stdio_ext.h>. 2017-08-01 15:27:27 -07:00
libc.mips64.map Finish <stdio_ext.h>. 2017-08-01 15:27:27 -07:00
libc.x86.map Finish <stdio_ext.h>. 2017-08-01 15:27:27 -07:00
libc.x86_64.map Finish <stdio_ext.h>. 2017-08-01 15:27:27 -07:00
libstdc++.arm.map Mark new/delete as weak in the NDK stubs. 2017-07-28 11:01:33 -07:00
libstdc++.arm64.map Mark new/delete as weak in the NDK stubs. 2017-07-28 11:01:33 -07:00
libstdc++.map.txt Mark new/delete as weak in the NDK stubs. 2017-07-28 11:01:33 -07:00
libstdc++.mips.map Mark new/delete as weak in the NDK stubs. 2017-07-28 11:01:33 -07:00
libstdc++.mips64.map Mark new/delete as weak in the NDK stubs. 2017-07-28 11:01:33 -07:00
libstdc++.x86.map Mark new/delete as weak in the NDK stubs. 2017-07-28 11:01:33 -07:00
libstdc++.x86_64.map Mark new/delete as weak in the NDK stubs. 2017-07-28 11:01:33 -07:00
MODULE_LICENSE_BSD
NOTICE Replace fmemopen. 2017-07-24 10:48:42 -07:00
SECCOMP_BLACKLIST.TXT Add seccomp blacklist, and exclude swap functions 2017-04-12 19:34:33 +00:00
SECCOMP_WHITELIST.TXT Remove restrict/__restrict. 2017-08-01 08:28:46 -07:00
SECCOMP_WHITELIST_GLOBAL.TXT Create global seccomp policy. 2017-07-21 20:30:21 -07:00
SYSCALLS.TXT MIPS64: move fstat64/fstatat64/_flush_cache syscalls to SECCOMP_WHITELIST.TXT 2017-06-15 10:25:09 +02:00
version_script.txt