On Wednesday 17 May 2006 10:34, Timothy R. Chavez wrote:
> out_fput:
> fput(filp);
> out:
> + audret = audit_mq_getsetattr(mqdes, &mqstat, &omqstat);
> + if (ret == 0)
> + ret = audret;
At a cursory glance, this looks a little fishy to me...
I think the intent is OK...but the real problem that I see is that it
generates a record also when calling mq_getattr(). Seems like the function
could be put here
1095 if (u_mqstat != NULL) {
1096 if (copy_from_user(&mqstat, u_mqstat, sizeof(struct
mq_attr)))
1097 return -EFAULT;
1098 if (mqstat.mq_flags & (~O_NONBLOCK))
1099 return -EINVAL;
--> audret = audit_mq_getsetattr(mqdes, &mqstat);
if (audret)
return audret;
1100 }
omqstat does not need to be recorded does it? AFAICT, this is the status
buffer going back to the user.
-Steve