Audit file descriptor and command arguments to ioctl(2).

Approved by:	re (audit argument blanket)
MFC after:	1 week
This commit is contained in:
rwatson 2009-07-02 09:16:25 +00:00
parent b803771ae1
commit 5260e3a73c

View File

@ -693,6 +693,8 @@ kern_ioctl(struct thread *td, int fd, u_long com, caddr_t data)
int error;
int tmp;
AUDIT_ARG_FD(fd);
AUDIT_ARG_CMD(com);
if ((error = fget(td, fd, &fp)) != 0)
return (error);
if ((fp->f_flag & (FREAD | FWRITE)) == 0) {