Commit 0897fcb1 authored by Quanfa Fu's avatar Quanfa Fu Committed by John Johansen

apparmor: make aa_set_current_onexec return void

Change the return type to void since it always return 0, and no need
to do the checking in aa_set_current_onexec.
Signed-off-by: default avatarQuanfa Fu <quanfafu@gmail.com>
Reviewed-by: default avatar"Tyler Hicks (Microsoft)" <code@tyhicks.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent 06c2afb8
......@@ -1446,7 +1446,7 @@ int aa_change_profile(const char *fqname, int flags)
}
/* full transition will be built in exec path */
error = aa_set_current_onexec(target, stack);
aa_set_current_onexec(target, stack);
}
audit:
......
......@@ -30,7 +30,7 @@ struct aa_task_ctx {
};
int aa_replace_current_label(struct aa_label *label);
int aa_set_current_onexec(struct aa_label *label, bool stack);
void aa_set_current_onexec(struct aa_label *label, bool stack);
int aa_set_current_hat(struct aa_label *label, u64 token);
int aa_restore_previous_label(u64 cookie);
struct aa_label *aa_get_task_label(struct task_struct *task);
......
......@@ -93,9 +93,8 @@ int aa_replace_current_label(struct aa_label *label)
* aa_set_current_onexec - set the tasks change_profile to happen onexec
* @label: system label to set at exec (MAYBE NULL to clear value)
* @stack: whether stacking should be done
* Returns: 0 or error on failure
*/
int aa_set_current_onexec(struct aa_label *label, bool stack)
void aa_set_current_onexec(struct aa_label *label, bool stack)
{
struct aa_task_ctx *ctx = task_ctx(current);
......@@ -103,8 +102,6 @@ int aa_set_current_onexec(struct aa_label *label, bool stack)
aa_put_label(ctx->onexec);
ctx->onexec = label;
ctx->token = stack;
return 0;
}
/**
......
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