unmount(2): do not allow MNT_DEFERRED or MNT_RECURSE flags from userspace
Repprted and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
@@ -1733,6 +1733,8 @@ kern_unmount(struct thread *td, const char *path, int flags)
|
||||
int error;
|
||||
|
||||
AUDIT_ARG_VALUE(flags);
|
||||
if ((flags & (MNT_DEFERRED | MNT_RECURSE)) != 0)
|
||||
return (EINVAL);
|
||||
if (jailed(td->td_ucred) || usermount == 0) {
|
||||
error = priv_check(td, PRIV_VFS_UNMOUNT);
|
||||
if (error)
|
||||
|
||||
Reference in New Issue
Block a user