diff options
author | JP Abgrall <jpa@google.com> | 2012-03-30 13:19:11 -0700 |
---|---|---|
committer | JP Abgrall <jpa@google.com> | 2012-03-30 13:19:11 -0700 |
commit | f91259a8f0d75d721761d588a4b811427565c984 (patch) | |
tree | 74cb40800dcb33752fc7d3550f1c10c9acadbe16 /adb/sockets.c | |
parent | d7f1feb5c8c76838b822d093983cc8a3f57a9b2d (diff) | |
download | core-f91259a8f0d75d721761d588a4b811427565c984.tar.gz core-f91259a8f0d75d721761d588a4b811427565c984.tar.bz2 core-f91259a8f0d75d721761d588a4b811427565c984.zip |
adb: fix non-linux builds. tcpip:, root:, usb: are not for ADB_HOST
The handling of adb root:/tpcip:/usb: is normally only for non-ADB_HOST.
This avoids getuid() being invoked on windows builds.
Change-Id: I365b81d9f70de99b9347d3eac82e690a8ac5e747
Diffstat (limited to 'adb/sockets.c')
-rw-r--r-- | adb/sockets.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/adb/sockets.c b/adb/sockets.c index 72151b4e7..91db95164 100644 --- a/adb/sockets.c +++ b/adb/sockets.c @@ -426,12 +426,14 @@ asocket *create_local_service_socket(const char *name) s = create_local_socket(fd); D("LS(%d): bound to '%s' via %d\n", s->id, name, fd); +#if !ADB_HOST if ((!strcmp(name, "root:") && getuid() != 0) || !strcmp(name, "usb:") || !strcmp(name, "tcpip:")) { D("LS(%d): enabling exit_on_close\n", s->id); s->exit_on_close = 1; } +#endif return s; } |