1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Audit pathnames looked up in swapon(2) and swapoff(2).

MFC after:	2 weeks
Obtained from:	TrustedBSD Project
This commit is contained in:
Robert Watson 2007-04-23 14:41:34 +00:00
parent cfda925270
commit d9135e724e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168979

View File

@ -1955,7 +1955,8 @@ swapon(struct thread *td, struct swapon_args *uap)
goto done; goto done;
} }
NDINIT(&nd, LOOKUP, ISOPEN | FOLLOW, UIO_USERSPACE, uap->name, td); NDINIT(&nd, LOOKUP, ISOPEN | FOLLOW | AUDITVNODE1, UIO_USERSPACE,
uap->name, td);
error = namei(&nd); error = namei(&nd);
if (error) if (error)
goto done; goto done;
@ -2084,7 +2085,8 @@ swapoff(struct thread *td, struct swapoff_args *uap)
tsleep(&swdev_syscall_active, PUSER - 1, "swpoff", 0); tsleep(&swdev_syscall_active, PUSER - 1, "swpoff", 0);
swdev_syscall_active = 1; swdev_syscall_active = 1;
NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, uap->name, td); NDINIT(&nd, LOOKUP, FOLLOW | AUDITVNODE1, UIO_USERSPACE, uap->name,
td);
error = namei(&nd); error = namei(&nd);
if (error) if (error)
goto done; goto done;