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:
Pawel Jakub Dawidek 2007-03-14 13:09:59 +00:00
parent ab6386e42d
commit 7533652025

@ -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);
}