summaryrefslogtreecommitdiff
path: root/security/apparmor/task.c
diff options
context:
space:
mode:
authorQuanfa Fu <quanfafu@gmail.com>2023-01-15 00:49:52 +0800
committerJohn Johansen <john.johansen@canonical.com>2023-07-09 17:30:51 -0700
commit0897fcb1c1e7316375166e0a665237bce2391a09 (patch)
treedb53124752ae51825125093f6788e847617e97d5 /security/apparmor/task.c
parent06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 (diff)
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: Quanfa Fu <quanfafu@gmail.com> Reviewed-by: "Tyler Hicks (Microsoft)" <code@tyhicks.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/task.c')
-rw-r--r--security/apparmor/task.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/security/apparmor/task.c b/security/apparmor/task.c
index 84d16a29bfcb..5671a716fcd2 100644
--- a/security/apparmor/task.c
+++ b/security/apparmor/task.c
@@ -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;
}
/**