Changeset View
Changeset View
Standalone View
Standalone View
kern/vfs_subr.c
Context not available. | |||||
{ | { | ||||
int error; | int error; | ||||
/* | if (jailed(td->td_ucred)) { | ||||
* If the thread is jailed, but this is not a jail-friendly file | /* | ||||
* system, deny immediately. | * If the jail of the calling thread lacks permission for | ||||
*/ | * this type of file system, deny immediately. | ||||
if (!(mp->mnt_vfc->vfc_flags & VFCF_JAIL) && jailed(td->td_ucred)) | */ | ||||
return (EPERM); | if ((error = prison_check_vfs(td->td_ucred, mp->mnt_vfc)) != 0) | ||||
return (error); | |||||
/* | /* | ||||
* If the file system was mounted outside the jail of the calling | * If the file system was mounted outside the jail of the | ||||
* thread, deny immediately. | * calling thread, deny immediately. | ||||
*/ | */ | ||||
if (prison_check(td->td_ucred, mp->mnt_cred) != 0) | if (prison_check(td->td_ucred, mp->mnt_cred) != 0) | ||||
return (EPERM); | return (EPERM); | ||||
} | |||||
/* | /* | ||||
* If file system supports delegated administration, we don't check | * If file system supports delegated administration, we don't check | ||||
Context not available. |