Don't deny mounting for jailed processes immediately, allow

prison_priv_check() to decide what to do.

This change is suppose not to change current (security) behaviour
in any way.

Reviewed by:	rwatson
This commit is contained in:
pjd 2007-03-14 13:09:59 +00:00
parent 8b96b52324
commit b8cb05ecd8

View File

@ -815,9 +815,7 @@ vfs_domount(
if (strlen(fstype) >= MFSNAMELEN || strlen(fspath) >= MNAMELEN)
return (ENAMETOOLONG);
if (jailed(td->td_ucred))
return (EPERM);
if (usermount == 0) {
if (jailed(td->td_ucred) || usermount == 0) {
if ((error = priv_check(td, PRIV_VFS_MOUNT)) != 0)
return (error);
}