mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +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:
parent
cfda925270
commit
d9135e724e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168979
@ -1955,7 +1955,8 @@ swapon(struct thread *td, struct swapon_args *uap)
|
||||
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);
|
||||
if (error)
|
||||
goto done;
|
||||
@ -2084,7 +2085,8 @@ swapoff(struct thread *td, struct swapoff_args *uap)
|
||||
tsleep(&swdev_syscall_active, PUSER - 1, "swpoff", 0);
|
||||
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);
|
||||
if (error)
|
||||
goto done;
|
||||
|
Loading…
Reference in New Issue
Block a user