Commit 79eb5b2e authored by topjohnwu's avatar topjohnwu

Rename entry

parent f0533fca
...@@ -74,7 +74,7 @@ void app_send_result(struct su_context *ctx, policy_t policy) { ...@@ -74,7 +74,7 @@ void app_send_result(struct su_context *ctx, policy_t policy) {
int notify = setup_user(ctx, user); int notify = setup_user(ctx, user);
char activity[128]; 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 // Send notice to manager, enable logging
char *result_command[] = { char *result_command[] = {
...@@ -113,7 +113,7 @@ void app_send_request(struct su_context *ctx) { ...@@ -113,7 +113,7 @@ void app_send_request(struct su_context *ctx) {
int notify = setup_user(ctx, user); int notify = setup_user(ctx, user);
char activity[128]; 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[] = { char *request_command[] = {
AM_PATH, "start", "-n", AM_PATH, "start", "-n",
...@@ -128,7 +128,7 @@ void app_send_request(struct su_context *ctx) { ...@@ -128,7 +128,7 @@ void app_send_request(struct su_context *ctx) {
// Send notice to user to tell them root is managed by owner // Send notice to user to tell them root is managed by owner
if (notify) { if (notify) {
sprintf(user, "%d", 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[] = { char *notify_command[] = {
AM_PATH, "broadcast", "-n", AM_PATH, "broadcast", "-n",
activity, activity,
......
...@@ -106,7 +106,7 @@ static void database_check(struct su_info *info) { ...@@ -106,7 +106,7 @@ static void database_check(struct su_info *info) {
// We need to check our manager // We need to check our manager
if (info->access.log || info->access.notify) 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) { static struct su_info *get_su_info(unsigned uid) {
...@@ -191,7 +191,7 @@ 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; info->access = SILENT_SU_ACCESS;
// If still not determined, check if manager exists // 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; info->access = NO_SU_ACCESS;
} }
return info; return info;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment