platform_bionic/libc/include
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
..
android Name function arguments in libc headers for Studio. 2017-08-11 17:45:59 -07:00
arpa Name function arguments in libc headers for Studio. 2017-08-21 14:51:59 -07:00
bits Merge "Name function arguments in libc headers for Studio." 2017-08-15 20:30:28 +00:00
net Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
netinet Name function arguments in libc headers for Studio. 2017-08-11 17:45:59 -07:00
netpacket
sys Merge "Disable FORTIFY on ASAN builds" 2017-08-18 22:52:27 +00:00
alloca.h Always include <sys/cdefs.h>. 2016-07-22 17:01:54 -07:00
ar.h Always include <sys/cdefs.h>. 2016-07-22 17:01:54 -07:00
assert.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
byteswap.h Always include <sys/cdefs.h>. 2016-07-22 17:01:54 -07:00
complex.h Name function arguments in libc headers for Studio. 2017-08-18 15:07:41 -07:00
cpio.h Add two missing POSIX constant-only headers. 2016-08-12 09:28:17 -07:00
ctype.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
dirent.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
dlfcn.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
elf.h Restore ELF32_ST_INFO/ELF64_ST_INFO. 2017-04-30 22:56:10 -07:00
endian.h Always include <sys/cdefs.h>. 2016-07-22 17:01:54 -07:00
err.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
errno.h Remove volatile from the __errno declaration. 2017-06-13 16:02:07 -07:00
error.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
fcntl.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
features.h Move the meat of <features.h> into <sys/cdefs.h>. 2014-08-19 11:18:20 -07:00
fenv.h Name function arguments in libc headers for Studio. 2017-08-18 15:07:41 -07:00
fnmatch.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
fts.h Name function arguments in libc headers for Studio. 2017-08-11 17:45:59 -07:00
ftw.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
getopt.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
grp.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
ifaddrs.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
inttypes.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
langinfo.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
lastlog.h Fix various empty .h files in bionic. 2016-04-29 22:30:19 -07:00
libgen.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
limits.h POSIX getlogin_r/LOGIN_NAME_MAX/TTY_NAME_MAX. 2017-07-28 16:34:38 -07:00
link.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
locale.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
malloc.h Name function arguments in libc headers for Studio. 2017-08-11 17:45:59 -07:00
math.h Name function arguments in libc headers for Studio. 2017-08-18 15:07:41 -07:00
memory.h
mntent.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
netdb.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
nl_types.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
paths.h libc: Add support to allow library calls to find appropriate shell executable for a process 2017-08-22 10:17:28 -07:00
poll.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
pthread.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
pty.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
pwd.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
regex.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
resolv.h Name function arguments in libc headers for Studio. 2017-08-21 14:51:59 -07:00
sched.h Name function arguments in libc headers for Studio. 2017-08-11 17:45:59 -07:00
search.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
semaphore.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
setjmp.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
signal.h Name function arguments in libc headers for Studio. 2017-08-11 17:45:59 -07:00
stdatomic.h Guard include of uchar.h in stdatomic.h 2016-08-04 18:22:12 +00:00
stdint.h Fix instances of '#if __LP64__'. 2016-09-15 14:21:28 -07:00
stdio.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
stdio_ext.h Name function arguments in libc headers for Studio. 2017-08-11 17:45:59 -07:00
stdlib.h Name function arguments in libc headers for Studio. 2017-08-11 17:45:59 -07:00
string.h Name function arguments in libc headers for Studio. 2017-08-18 15:07:41 -07:00
strings.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
syscall.h Add all the glibc one-line "synonym" header files. 2015-07-17 13:59:36 -07:00
sysexits.h Always include <sys/cdefs.h>. 2016-07-22 17:01:54 -07:00
syslog.h Name function arguments in libc headers for Studio. 2017-08-11 17:45:59 -07:00
tar.h Add two missing POSIX constant-only headers. 2016-08-12 09:28:17 -07:00
termio.h Always include <sys/cdefs.h>. 2016-07-22 17:01:54 -07:00
termios.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
time.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
time64.h
uchar.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
ucontext.h Always include <sys/cdefs.h>. 2016-07-22 17:01:54 -07:00
unistd.h Merge "libc: Split FORTIFY into its own headers" 2017-08-01 02:03:52 +00:00
utime.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
utmp.h Name function arguments in libc headers for Studio. 2017-08-11 17:45:59 -07:00
wait.h Add all the glibc one-line "synonym" header files. 2015-07-17 13:59:36 -07:00
wchar.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
wctype.h Re-submit "Name function arguments in libc headers for Studio." 2017-08-18 00:00:38 +00:00
xlocale.h Always include <sys/cdefs.h>. 2016-07-22 17:01:54 -07:00