• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

external/koush/Superuser


Commit MetaInfo

Revisiona16b46816cd7c54b6c39fe9ba7a184da66215d0e (tree)
Time2013-11-30 00:35:22
Authorh1618 <h1618@onli...>
Commiterh1618

Log Message

assign user before use

sorry, jumped too short on my last commit: the user array has to be initialized before first use ...

Change Summary

Incremental Difference

--- a/Superuser/jni/su/activity.c
+++ b/Superuser/jni/su/activity.c
@@ -90,6 +90,9 @@ int send_result(struct su_context *ctx, policy_t policy) {
9090 char desired_uid[256];
9191 sprintf(desired_uid, "%d", ctx->to.uid);
9292
93+ char user[64];
94+ get_owner_login_user_args(ctx, user, sizeof(user));
95+
9396 if (0 != ctx->user.android_user_id) {
9497 char android_user_id[256];
9598 sprintf(android_user_id, "%d", ctx->user.android_user_id);
@@ -125,9 +128,6 @@ int send_result(struct su_context *ctx, policy_t policy) {
125128 silent_run(user_result_command);
126129 }
127130
128- char user[64];
129- get_owner_login_user_args(ctx, user, sizeof(user));
130-
131131 char *result_command[] = {
132132 AM_PATH,
133133 ACTION_RESULT,