Changeset View
Changeset View
Standalone View
Standalone View
kern/vfs_mount.c
Context not available. | |||||
KASSERT((fsflags & MNT_UPDATE) == 0, ("MNT_UPDATE shouldn't be here")); | KASSERT((fsflags & MNT_UPDATE) == 0, ("MNT_UPDATE shouldn't be here")); | ||||
/* | /* | ||||
* If the thread is jailed, make sure the jail has permission to mount | |||||
* this type of file system. | |||||
*/ | |||||
if (jailed(td->td_ucred) && | |||||
(error = prison_check_vfs(td->td_ucred, vfsp)) != 0) { | |||||
vput(vp); | |||||
return (error); | |||||
} | |||||
/* | |||||
* If the user is not root, ensure that they own the directory | * If the user is not root, ensure that they own the directory | ||||
* onto which we are attempting to mount. | * onto which we are attempting to mount. | ||||
*/ | */ | ||||
Context not available. | |||||
vfsp = vfs_byname_kld(fstype, td, &error); | vfsp = vfs_byname_kld(fstype, td, &error); | ||||
if (vfsp == NULL) | if (vfsp == NULL) | ||||
return (ENODEV); | return (ENODEV); | ||||
if (jailed(td->td_ucred) && !(vfsp->vfc_flags & VFCF_JAIL)) | |||||
return (EPERM); | |||||
} | } | ||||
/* | /* | ||||
Context not available. |