summaryrefslogtreecommitdiff
path: root/sys/miscfs
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1999-03-18 08:34:19 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1999-03-18 08:34:19 +0000
commit170609b8efa314c51c9d0a198d628bd11f2fc21a (patch)
tree2cb222be81dfbc4a0b244e233a11249158a705c6 /sys/miscfs
parent53d51af8d97788ada70cdd5583f3c51a2f444336 (diff)
Don't allow users to mount umapfs.
(only a problem when kern.usermount == 1)
Diffstat (limited to 'sys/miscfs')
-rw-r--r--sys/miscfs/umapfs/umap_vfsops.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/miscfs/umapfs/umap_vfsops.c b/sys/miscfs/umapfs/umap_vfsops.c
index 584e27e0e3c..992fd5a4d35 100644
--- a/sys/miscfs/umapfs/umap_vfsops.c
+++ b/sys/miscfs/umapfs/umap_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umap_vfsops.c,v 1.12 1998/02/08 22:41:41 tholo Exp $ */
+/* $OpenBSD: umap_vfsops.c,v 1.13 1999/03/18 08:34:18 art Exp $ */
/* $NetBSD: umap_vfsops.c,v 1.9 1996/02/09 22:41:05 christos Exp $ */
/*
@@ -94,6 +94,12 @@ umapfs_mount(mp, path, data, ndp, p)
#endif
/*
+ * Don't allow users to play with umapfs (when usermount is true).
+ */
+ if (p->p_ucred->cr_uid != 0)
+ return EPERM;
+
+ /*
* Update is a no-op
*/
if (mp->mnt_flag & MNT_UPDATE) {