platform_system_core/adb
Nick Kralevich 8fcb631389 adb: avoid leaking file descriptors
If an adb shell connection comes in while taking a screenshot,
an open pipe file descriptor will be leaked to the shell process.
This causes SELinux denials of the form:

  avc: denied { read } for path="pipe:[21838]" dev="pipefs" ino=21838 scontext=u:r:shell:s0 tcontext=u:r:adbd:s0 tclass=fifo_file permissive=0
  avc: denied { write } for path="pipe:[21838]" dev="pipefs" ino=21838 scontext=u:r:shell:s0 tcontext=u:r:adbd:s0 tclass=fifo_file permissive=0

Set O_CLOEXEC on the pipe connections, to avoid leaking them
across an exec boundary.

Bug: 15437785
Change-Id: Id2304b316bd7082d8baac246dce1f0e0e26e9197
2014-06-05 20:26:25 -07:00
..
Android.mk Merge changes Idfd1a114,If725a1cb,I61211165,If9a05ccb 2014-05-07 23:10:40 +00:00
MODULE_LICENSE_APACHE2 eclair snapshot 2009-11-12 18:46:23 -08:00
NOTICE eclair snapshot 2009-11-12 18:46:23 -08:00
OVERVIEW.TXT Fixing spelling errors in adb docs 2010-04-28 11:38:39 -04:00
SERVICES.TXT adb: implement "adb reverse <local> <remote>" 2014-05-27 16:42:13 +02:00
SYNC.TXT Adding documentation on the sync part of the adb protocol previously missing. 2014-03-20 20:36:46 +01:00
adb.c am 6e7343b8: Merge "adb: implement "adb reverse <local> <remote>"" 2014-05-27 16:33:16 +00:00
adb.h adb: implement "adb reverse <local> <remote>" 2014-05-27 16:42:13 +02:00
adb_auth.h adb: Fix secure adb when booting with usb attached 2013-02-02 01:19:06 +00:00
adb_auth_client.c mincrypt: support SHA-256 hash algorithm 2013-09-25 09:26:34 -07:00
adb_auth_host.c adb: avoid compilation errors for unused results 2014-05-13 09:12:54 -07:00
adb_client.c Fix adb forward --list when forwarding a lot 2014-02-21 14:57:02 +01:00
adb_client.h Support adb client connect to remote server 2013-01-04 11:00:38 -08:00
backup_service.c adb: turn on -Werror 2014-05-05 10:30:06 -07:00
commandline.c Skip the "--abi" flag on "adb install" if present. 2014-05-29 15:54:10 +01:00
console.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
fdevent.c adb: keep mac build happy 2011-03-29 12:36:22 -07:00
fdevent.h adb: fix subprocess exit handling, oom adjust fixes, extra debugging. 2011-03-28 14:12:22 -07:00
file_sync_client.c adb: turn on -Werror 2014-05-05 10:30:06 -07:00
file_sync_service.c adb: Don't unlink special files on sync failure. 2014-03-07 17:31:25 -08:00
file_sync_service.h Added transfer progress reporting for push and pull commands. 2014-03-11 19:31:26 -07:00
framebuffer_service.c adb: avoid leaking file descriptors 2014-06-05 20:26:25 -07:00
get_my_path_darwin.c eclair snapshot 2009-11-12 18:46:23 -08:00
get_my_path_freebsd.c FreeBSD support for usb-connected devices in adb 2009-10-25 01:56:35 +11:00
get_my_path_linux.c Make get_my_path() safer 2009-10-22 02:55:00 +11:00
get_my_path_windows.c Make get_my_path() safer 2009-10-22 02:55:00 +11:00
jdwp_service.c Fix adb leaking file descriptors to forked processes 2011-02-03 15:26:45 -05:00
mutex_list.h adb: Cleanup dead code 2013-04-24 21:31:45 -07:00
protocol.txt adb: Add public key authentification 2012-08-23 00:20:06 -07:00
remount_service.c adb: turn on -Werror 2014-05-05 10:30:06 -07:00
services.c am 6e7343b8: Merge "adb: implement "adb reverse <local> <remote>"" 2014-05-27 16:33:16 +00:00
sockets.c system/core 64-bit cleanup. 2014-01-16 12:54:18 -08:00
sockets.dia auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
sysdeps.h Fix win32 implicit declaration of function socket_network_client_timeout. 2014-05-20 08:51:15 -07:00
sysdeps_win32.c Fix win32 undefined reference to `_socket_network_client_timeout'. 2014-05-20 12:13:29 -07:00
test_track_devices.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
test_track_jdwp.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
transport.c adb: fix windows build after "forward --list" fix. 2014-03-06 19:40:45 -08:00
transport.h adb: fix subprocess exit handling, oom adjust fixes, extra debugging. 2011-03-28 14:12:22 -07:00
transport_local.c adb: Increase the max number of emulator instances to 64 2014-03-13 11:21:58 +01:00
transport_usb.c adb: Improved detection of big endian architecture 2010-10-16 14:35:28 +02:00
usb_libusb.c adb: Add ability to specify device path 2012-04-20 11:21:14 -07:00
usb_linux.c system/core 64-bit cleanup. 2014-01-16 12:54:18 -08:00
usb_linux_client.c Merge "adbd: Don't close/reopen FFS ep0 on disconnect" 2014-01-28 00:07:15 +00:00
usb_osx.c adb: Add ability to specify device path 2012-04-20 11:21:14 -07:00
usb_vendors.c adb: Add USB vendor ID for Unowhy 2014-05-27 14:23:11 -07:00
usb_vendors.h adb: Add vendor IDs for iRiver, Compal and T & A Mobile Phones 2011-07-11 09:39:39 -04:00
usb_windows.c adb: turn on -Werror 2014-05-05 10:30:06 -07:00