]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - kernel/auditsc.c
UBUNTU: SAUCE: LSM: Use lsmblob in security_ipc_getsecid
[mirror_ubuntu-jammy-kernel.git] / kernel / auditsc.c
index c8f8f6276c206f49b167bd8317193f624bd913de..dd9f60c870eaa1b587d8ee2cbd2110dae7afabd7 100644 (file)
@@ -2338,12 +2338,16 @@ void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
 void __audit_ipc_obj(struct kern_ipc_perm *ipcp)
 {
        struct audit_context *context = audit_context();
-
+       struct lsmblob blob;
        context->ipc.uid = ipcp->uid;
        context->ipc.gid = ipcp->gid;
        context->ipc.mode = ipcp->mode;
        context->ipc.has_perm = 0;
-       security_ipc_getsecid(ipcp, &context->ipc.osid);
+       security_ipc_getsecid(ipcp, &blob);
+       /* context->ipc.osid will be changed to a lsmblob later in
+        * the patch series. This will allow auditing of all the object
+        * labels associated with the ipc object. */
+       context->ipc.osid = lsmblob_value(&blob);
        context->type = AUDIT_IPC;
 }