diff options
author | pjd <pjd@FreeBSD.org> | 2007-03-14 13:09:59 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-03-14 13:09:59 +0000 |
commit | b8cb05ecd8444da176a55118fe87d2f4b8bb0691 (patch) | |
tree | 50098ac97ddf3bcba62498ae70003d90bee68a71 | |
parent | 8b96b5232420734d22c85e519f262cf1c933156c (diff) | |
download | FreeBSD-src-b8cb05ecd8444da176a55118fe87d2f4b8bb0691.zip FreeBSD-src-b8cb05ecd8444da176a55118fe87d2f4b8bb0691.tar.gz |
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
-rw-r--r-- | sys/kern/vfs_mount.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 38bd924..5778c9c 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -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); } |