platform_system_core/adb
Pavel Labath 64d9adcea8 Fix file descriptor leakage in adbd
adb_auth_init in adb_auth_client.cpp sets FD_CLOEXEC on the control
socket, which prevents the leakage. However if ro.adb.secure
property is unset (as it is on the emulator), adb_auth_init is not
invoked, which results in the control socket fd leaking into any
process started by the deamon (specifically, any command executed
through adb shell).

Split the fd cleanup into a separate function that is called
unconditionally.

Change-Id: I73ea84977542ddfc4ac20599593ecf3745ae9108
2015-03-17 11:24:34 -07:00
..
tests Make the root/unroot test more robust. 2015-03-09 10:45:50 -07:00
.clang-format Add .clang-format file. 2015-02-24 16:56:39 -08:00
adb.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
adb.h Revert "Revert "adb: support /oem partition"" 2015-03-16 20:05:21 -07:00
adb_auth.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
adb_auth.h Fix file descriptor leakage in adbd 2015-03-17 11:24:34 -07:00
adb_auth_client.cpp Fix file descriptor leakage in adbd 2015-03-17 11:24:34 -07:00
adb_auth_host.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
adb_client.cpp adb doesn't actually use libzipfile. 2015-03-13 09:40:45 -07:00
adb_client.h Move adb to C++. 2015-03-09 14:06:11 -07:00
adb_io.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
adb_io.h Test readx/writex (now renamed). 2015-02-25 15:07:57 -08:00
adb_io_test.cpp Create libbase. 2015-03-14 16:36:18 -07:00
adb_listeners.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
adb_listeners.h Move the listener code into its own file. 2015-02-18 18:22:52 -08:00
adb_main.cpp Fix file descriptor leakage in adbd 2015-03-17 11:24:34 -07:00
adb_trace.h Test readx/writex (now renamed). 2015-02-25 15:07:57 -08:00
Android.mk Revert "Revert "adb: support /oem partition"" 2015-03-16 20:05:21 -07:00
commandline.cpp Revert "Revert "adb: support /oem partition"" 2015-03-16 20:05:21 -07:00
console.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
CPPLINT.cfg Ignore another stupid lint warning. 2015-02-20 17:19:22 -08:00
fdevent.cpp Test readx/writex (now renamed). 2015-02-25 15:07:57 -08:00
fdevent.h Begin moving code from adb to libadb. 2015-01-26 16:45:34 -08:00
file_sync_client.cpp adb doesn't actually use libzipfile. 2015-03-13 09:40:45 -07:00
file_sync_service.cpp Revert "Revert "adb: support /oem partition"" 2015-03-16 20:05:21 -07:00
file_sync_service.h Add extern "C" to all the adb headers. 2015-02-18 00:21:16 -08:00
framebuffer_service.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
get_my_path_darwin.c Move adb to C++. 2015-03-09 14:06:11 -07:00
get_my_path_linux.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
get_my_path_windows.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
jdwp_service.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
MODULE_LICENSE_APACHE2 eclair snapshot 2009-11-12 18:46:23 -08:00
mutex_list.h adb: Cleanup dead code 2013-04-24 21:31:45 -07: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
protocol.txt adb: Add public key authentification 2012-08-23 00:20:06 -07:00
qemu_tracing.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
qemu_tracing.h Move emulator tracing into its own file. 2015-02-18 17:21:17 -08:00
remount_service.cpp Revert "Revert "adb: support /oem partition"" 2015-03-16 20:05:21 -07:00
remount_service.h Revert "Revert "adb: support /oem partition"" 2015-03-16 20:05:21 -07:00
services.cpp Revert "Revert "adb: support /oem partition"" 2015-03-16 20:05:21 -07:00
SERVICES.TXT adb: implement "adb reverse <local> <remote>" 2014-05-27 16:42:13 +02:00
set_verity_enable_state_service.cpp Revert "Revert "adb: support /oem partition"" 2015-03-16 20:05:21 -07:00
sockets.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
sockets.dia auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
SYNC.TXT Adding documentation on the sync part of the adb protocol previously missing. 2014-03-20 20:36:46 +01:00
sysdeps.h Test readx/writex (now renamed). 2015-02-25 15:07:57 -08:00
sysdeps_win32.c adb: Win32: set socket buffer sizes properly 2015-01-26 21:56:26 -08:00
test_track_devices.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
test_track_jdwp.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
transport.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
transport.h Move adb to C++. 2015-03-09 14:06:11 -07:00
transport_local.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
transport_test.cpp Add some basic tests to adb. 2015-02-25 10:57:26 -08:00
transport_usb.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
usb_linux.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
usb_linux_client.c Move transport declarations into transport.h. 2015-02-24 21:30:22 -08:00
usb_osx.c Fix the mac build. 2015-02-25 10:26:17 -08:00
usb_windows.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00