diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-03-18 08:34:19 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-03-18 08:34:19 +0000 |
commit | 170609b8efa314c51c9d0a198d628bd11f2fc21a (patch) | |
tree | 2cb222be81dfbc4a0b244e233a11249158a705c6 | |
parent | 53d51af8d97788ada70cdd5583f3c51a2f444336 (diff) |
Don't allow users to mount umapfs.
(only a problem when kern.usermount == 1)
-rw-r--r-- | sys/miscfs/umapfs/umap_vfsops.c | 8 |
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) { |