OSDN Git Service

Don't use "am --user" unless multiuser mode is enabled (bug #204)
authorKevin Cernekee <cernekee@gmail.com>
Sat, 23 Nov 2013 23:46:06 +0000 (15:46 -0800)
committerKoushik Dutta <koushd@gmail.com>
Sun, 24 Nov 2013 21:42:35 +0000 (13:42 -0800)
Superuser/jni/su/activity.c

index eb18759..5e7163f 100644 (file)
@@ -152,7 +152,7 @@ int send_result(struct su_context *ctx, policy_t policy) {
         "--es",
         "action",
         policy == ALLOW ? "allow" : "deny",
-        "--user",
+        user[0] ? "--user" : NULL,
         user,
         NULL
     };
@@ -199,7 +199,7 @@ int send_request(struct su_context *ctx) {
         "--es",
         "socket",
         ctx->sock_path,
-        "--user",
+        user[0] ? "--user" : NULL,
         user,
         NULL
     };