diff --git a/activity.c b/activity.c index 54c376f5f..9058fa1b1 100644 --- a/activity.c +++ b/activity.c @@ -74,7 +74,7 @@ void app_send_result(struct su_context *ctx, policy_t policy) { int notify = setup_user(ctx, user); char activity[128]; - sprintf(activity, ACTION_RESULT, ctx->info->str.s[SU_REQUESTER]); + sprintf(activity, ACTION_RESULT, ctx->info->str.s[SU_MANAGER]); // Send notice to manager, enable logging char *result_command[] = { @@ -113,7 +113,7 @@ void app_send_request(struct su_context *ctx) { int notify = setup_user(ctx, user); char activity[128]; - sprintf(activity, ACTION_REQUEST, ctx->info->str.s[SU_REQUESTER]); + sprintf(activity, ACTION_REQUEST, ctx->info->str.s[SU_MANAGER]); char *request_command[] = { AM_PATH, "start", "-n", @@ -128,7 +128,7 @@ void app_send_request(struct su_context *ctx) { // Send notice to user to tell them root is managed by owner if (notify) { sprintf(user, "%d", notify); - sprintf(activity, ACTION_RESULT, ctx->info->str.s[SU_REQUESTER]); + sprintf(activity, ACTION_RESULT, ctx->info->str.s[SU_MANAGER]); char *notify_command[] = { AM_PATH, "broadcast", "-n", activity, diff --git a/su_daemon.c b/su_daemon.c index f03935f31..228ae200c 100644 --- a/su_daemon.c +++ b/su_daemon.c @@ -106,7 +106,7 @@ static void database_check(struct su_info *info) { // We need to check our manager if (info->access.log || info->access.notify) - validate_manager(info->str.s[SU_REQUESTER], uid / 100000, &info->manager_stat); + validate_manager(info->str.s[SU_MANAGER], uid / 100000, &info->manager_stat); } static struct su_info *get_su_info(unsigned uid) { @@ -191,7 +191,7 @@ static struct su_info *get_su_info(unsigned uid) { info->access = SILENT_SU_ACCESS; // If still not determined, check if manager exists - if (info->access.policy == QUERY && info->str.s[SU_REQUESTER][0] == '\0') + if (info->access.policy == QUERY && info->str.s[SU_MANAGER][0] == '\0') info->access = NO_SU_ACCESS; } return info;