Audit the file-descriptor number argument for openat(2). Remove a comment
about the desirability of auditing the number, as it was in fact in the wrong place (in the common path for open(2) and openat(2), and only the latter accepts a file-descriptor argument). Where other ABIs support openat(2), it may be necessary to do additional argument auditing as it is not performed in kern_openat(9). MFC after: 3 days Sponsored by: DARPA, AFRL
This commit is contained in:
parent
d09bf88425
commit
8ec75c0fc3
@ -942,6 +942,7 @@ int
|
||||
sys_openat(struct thread *td, struct openat_args *uap)
|
||||
{
|
||||
|
||||
AUDIT_ARG_FD(uap->fd);
|
||||
return (kern_openat(td, uap->fd, uap->path, UIO_USERSPACE, uap->flag,
|
||||
uap->mode));
|
||||
}
|
||||
@ -962,7 +963,6 @@ kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg,
|
||||
|
||||
AUDIT_ARG_FFLAGS(flags);
|
||||
AUDIT_ARG_MODE(mode);
|
||||
/* XXX: audit dirfd */
|
||||
cap_rights_init(&rights, CAP_LOOKUP);
|
||||
flags_to_rights(flags, &rights);
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user