diff options
author | Xiu Jianfeng <xiujianfeng@huawei.com> | 2022-10-21 08:46:04 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-18 11:41:17 +0100 |
commit | 3339d808b6096f95160651ff40b141138abb4d2e (patch) | |
tree | 608f0589f0912a09df9c0676bbd3fbf6165fc887 /security | |
parent | f7368ac846aebfdbca00ac4e03620ac2120037cc (diff) |
apparmor: Use pointer to struct aa_label for lbs_cred
[ Upstream commit 37923d4321b1e38170086da2c117f78f2b0f49c6 ]
According to the implementations of cred_label() and set_cred_label(),
we should use pointer to struct aa_label for lbs_cred instead of struct
aa_task_ctx, this patch fixes it.
Fixes: bbd3662a8348 ("Infrastructure management of the cred security blob")
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/lsm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index e31965dc6dd1..21e03380dd86 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -1148,10 +1148,10 @@ static int apparmor_inet_conn_request(struct sock *sk, struct sk_buff *skb, #endif /* - * The cred blob is a pointer to, not an instance of, an aa_task_ctx. + * The cred blob is a pointer to, not an instance of, an aa_label. */ struct lsm_blob_sizes apparmor_blob_sizes __lsm_ro_after_init = { - .lbs_cred = sizeof(struct aa_task_ctx *), + .lbs_cred = sizeof(struct aa_label *), .lbs_file = sizeof(struct aa_file_ctx), .lbs_task = sizeof(struct aa_task_ctx), }; |