platform_bionic/libc/upstream-netbsd
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/include libc: Add support to allow library calls to find appropriate shell executable for a process 2017-08-22 10:17:28 -07:00
common/lib/libc Get the full set of PRNG functions in <stdlib.h> 2014-06-12 14:37:31 -07:00
lib/libc Fix ftw/nftw to only report unreadable directories once. 2016-04-18 12:05:18 -07:00
README.md Move to .md files for even trivial documentation. 2017-01-07 12:47:28 -08:00

This directory contains upstream NetBSD source. You should not edit these files directly. Make fixes upstream and then pull down the new version of the file.

TODO: write a script to make this process automated.