Merge "debuggerd: Fix missing include."
diff --git a/adb/adb.c b/adb/adb.c
index 679b086..f5e6e0c 100644
--- a/adb/adb.c
+++ b/adb/adb.c
@@ -682,9 +682,11 @@
     dup2(fd, 1);
     dup2(fd, 2);
     fprintf(stderr,"--- adb starting (pid %d) ---\n", getpid());
+    adb_close(fd);
 
     fd = unix_open("/dev/null", O_RDONLY);
     dup2(fd, 0);
+    adb_close(fd);
 }
 #endif
 
diff --git a/adb/jdwp_service.c b/adb/jdwp_service.c
index 296f718..cd62b55 100644
--- a/adb/jdwp_service.c
+++ b/adb/jdwp_service.c
@@ -499,6 +499,7 @@
 
     /* only wait for incoming connections */
     fdevent_add(control->fde, FDE_READ);
+    close_on_exec(s);
 
     D("jdwp control socket started (%d)\n", control->listen_socket);
     return 0;
diff --git a/adb/services.c b/adb/services.c
index 487c7d3..c22ce17 100644
--- a/adb/services.c
+++ b/adb/services.c
@@ -309,6 +309,7 @@
         dup2(pts, 1);
         dup2(pts, 2);
 
+        adb_close(pts);
         adb_close(ptm);
 
         execl(cmd, cmd, arg0, arg1, NULL);
diff --git a/adb/sysdeps.h b/adb/sysdeps.h
index 6372649..74f4ed1 100644
--- a/adb/sysdeps.h
+++ b/adb/sysdeps.h
@@ -387,7 +387,13 @@
 
 static __inline__ int  adb_socket_accept(int  serverfd, struct sockaddr*  addr, socklen_t  *addrlen)
 {
-    return  accept( serverfd, addr, addrlen );
+    int fd;
+
+    fd = accept(serverfd, addr, addrlen);
+    if (fd >= 0)
+        close_on_exec(fd);
+
+    return fd;
 }
 
 #undef   accept
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 8c2bbee..7f99ce7 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -178,8 +178,6 @@
 
     # create directory for DRM plug-ins
     mkdir /data/drm 0774 drm drm
-    mkdir /data/drm/plugins 0774 drm drm
-    mkdir /data/drm/plugins/native 0774 drm drm
 
     # If there is no fs-post-data action in the init.<device>.rc file, you
     # must uncomment this line, otherwise encrypted filesystems