external/koush/Superuser
Revision | a16b46816cd7c54b6c39fe9ba7a184da66215d0e (tree) |
---|---|
Time | 2013-11-30 00:35:22 |
Author | h1618 <h1618@onli...> |
Commiter | h1618 |
assign user before use
sorry, jumped too short on my last commit: the user array has to be initialized before first use ...
@@ -90,6 +90,9 @@ int send_result(struct su_context *ctx, policy_t policy) { | ||
90 | 90 | char desired_uid[256]; |
91 | 91 | sprintf(desired_uid, "%d", ctx->to.uid); |
92 | 92 | |
93 | + char user[64]; | |
94 | + get_owner_login_user_args(ctx, user, sizeof(user)); | |
95 | + | |
93 | 96 | if (0 != ctx->user.android_user_id) { |
94 | 97 | char android_user_id[256]; |
95 | 98 | sprintf(android_user_id, "%d", ctx->user.android_user_id); |
@@ -125,9 +128,6 @@ int send_result(struct su_context *ctx, policy_t policy) { | ||
125 | 128 | silent_run(user_result_command); |
126 | 129 | } |
127 | 130 | |
128 | - char user[64]; | |
129 | - get_owner_login_user_args(ctx, user, sizeof(user)); | |
130 | - | |
131 | 131 | char *result_command[] = { |
132 | 132 | AM_PATH, |
133 | 133 | ACTION_RESULT, |