Skip to content

Commit 37923d4

Browse files
Xiu Jianfengjrjohansen
authored andcommitted
apparmor: Use pointer to struct aa_label for lbs_cred
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: bbd3662 ("Infrastructure management of the cred security blob") Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
1 parent a221738 commit 37923d4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

security/apparmor/lsm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,10 +1198,10 @@ static int apparmor_inet_conn_request(const struct sock *sk, struct sk_buff *skb
11981198
#endif
11991199

12001200
/*
1201-
* The cred blob is a pointer to, not an instance of, an aa_task_ctx.
1201+
* The cred blob is a pointer to, not an instance of, an aa_label.
12021202
*/
12031203
struct lsm_blob_sizes apparmor_blob_sizes __lsm_ro_after_init = {
1204-
.lbs_cred = sizeof(struct aa_task_ctx *),
1204+
.lbs_cred = sizeof(struct aa_label *),
12051205
.lbs_file = sizeof(struct aa_file_ctx),
12061206
.lbs_task = sizeof(struct aa_task_ctx),
12071207
};

0 commit comments

Comments
 (0)