OSDN Git Service

Fix merge derp: Emulated storage should be mounted in the child, not the
authorDanny Baumann <dannybaumann@web.de>
Fri, 31 Jan 2014 12:18:43 +0000 (13:18 +0100)
committerDanny Baumann <dannybaumann@web.de>
Fri, 31 Jan 2014 12:18:43 +0000 (13:18 +0100)
parent.

Change-Id: I7bb6e8db1a64de90e96783e07ff26932befe2742

Superuser/jni/su/daemon.c

index e274372..b0b278f 100644 (file)
@@ -356,12 +356,6 @@ static int daemon_accept(int fd) {
             PLOGE("unable to write exit code");
         }
 
-#ifdef SUPERUSER_EMBEDDED
-        if (mount_storage) {
-            mount_emulated_storage(multiuser_get_user_id(daemon_from_uid));
-        }
-#endif
-
         close(fd);
         LOGD("child exited");
         return code;
@@ -406,6 +400,12 @@ static int daemon_accept(int fd) {
     }
     free(pts_slave);
 
+#ifdef SUPERUSER_EMBEDDED
+    if (mount_storage) {
+        mount_emulated_storage(multiuser_get_user_id(daemon_from_uid));
+    }
+#endif
+
     return run_daemon_child(infd, outfd, errfd, argc, argv);
 }