summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r--sys/kern/vfs_syscalls.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 915e26a..8247f8d 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -307,6 +307,11 @@ vfs_mount(td, fstype, fspath, fsflags, fsdata)
vput(vp);
return error;
}
+ error = securelevel_gt(td->td_ucred, 0);
+ if (error == 0) {
+ vput(vp);
+ return (EPERM);
+ }
error = linker_load_file(fstype, &lf);
if (error || lf == NULL) {
vput(vp);
OpenPOWER on IntegriCloud