/* __audit_mq_open - record audit data for a POSIX MQ open @oflag: open flag @mode: mode bits @attr: queue attributes  */
void __audit_mq_open(int oflag, mode_t mode, struct mq_attr *attr)
/* __audit_mq_open - record audit data for a POSIX MQ open @oflag: open flag @mode: mode bits @attr: queue attributes  */
void __audit_mq_open(int oflag, mode_t mode, struct mq_attr *attr)
{
	struct audit_context *context = current->audit_context;
	if (attr)
		memcpy(&context->mq_open.attr, attr, sizeof(struct mq_attr));
	else
		memset(&context->mq_open.attr, 0, sizeof(struct mq_attr));
	context->mq_open.oflag = oflag;
	context->mq_open.mode = mode;
	context->type = AUDIT_MQ_OPEN;
}