Rather than copying out the full audit trigger record, which includes

a queue entry field, just copy out the unsigned int that is the trigger
message.  In practice, auditd always requested sizeof(unsigned int), so
the extra bytes were ignored, but copying them out was not the intent.

MFC after:	1 month
This commit is contained in:
Robert Watson 2008-03-02 21:34:17 +00:00
parent fb3b9b52bc
commit 8805ca53e7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176749

View File

@ -113,7 +113,7 @@ audit_read(struct cdev *dev, struct uio *uio, int ioflag)
}
mtx_unlock(&audit_trigger_mtx);
if (!error) {
error = uiomove(ti, sizeof *ti, uio);
error = uiomove(&ti->trigger, sizeof(ti->trigger), uio);
free(ti, M_AUDITTRIGGER);
}
return (error);