prison_check_nfsd: Add check for enforce_statfs != 0
Since mountd(8) will not be able to do exports when running in a vnet prison if enforce_statfs is set to 0, add a check for this to prison_check_nfsd(). Reviewed by: jamie, markj MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D38189
This commit is contained in:
@@ -3491,6 +3491,8 @@ prison_check(struct ucred *cred1, struct ucred *cred2)
|
|||||||
* - The root directory (pr_root) of the prison must be
|
* - The root directory (pr_root) of the prison must be
|
||||||
* a file system mount point, so the mountd can hang
|
* a file system mount point, so the mountd can hang
|
||||||
* export information on it.
|
* export information on it.
|
||||||
|
* - The prison's enforce_statfs cannot be 0, so that
|
||||||
|
* mountd(8) can do exports.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
prison_check_nfsd(struct ucred *cred)
|
prison_check_nfsd(struct ucred *cred)
|
||||||
@@ -3502,6 +3504,8 @@ prison_check_nfsd(struct ucred *cred)
|
|||||||
return (false);
|
return (false);
|
||||||
if ((cred->cr_prison->pr_root->v_vflag & VV_ROOT) == 0)
|
if ((cred->cr_prison->pr_root->v_vflag & VV_ROOT) == 0)
|
||||||
return (false);
|
return (false);
|
||||||
|
if (cred->cr_prison->pr_enforce_statfs == 0)
|
||||||
|
return (false);
|
||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user