summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adb/sockets.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/adb/sockets.c b/adb/sockets.c
index 91db95164..cd31b23db 100644
--- a/adb/sockets.c
+++ b/adb/sockets.c
@@ -427,9 +427,9 @@ asocket *create_local_service_socket(const char *name)
427 D("LS(%d): bound to '%s' via %d\n", s->id, name, fd); 427 D("LS(%d): bound to '%s' via %d\n", s->id, name, fd);
428 428
429#if !ADB_HOST 429#if !ADB_HOST
430 if ((!strcmp(name, "root:") && getuid() != 0) 430 if ((!strncmp(name, "root:", 5) && getuid() != 0)
431 || !strcmp(name, "usb:") 431 || !strncmp(name, "usb:", 4)
432 || !strcmp(name, "tcpip:")) { 432 || !strncmp(name, "tcpip:", 6)) {
433 D("LS(%d): enabling exit_on_close\n", s->id); 433 D("LS(%d): enabling exit_on_close\n", s->id);
434 s->exit_on_close = 1; 434 s->exit_on_close = 1;
435 } 435 }