diff options
| author | bouyer <bouyer@NetBSD.org> | 1999-03-12 18:16:44 +0000 |
|---|---|---|
| committer | bouyer <bouyer@NetBSD.org> | 1999-03-12 18:16:44 +0000 |
| commit | 0a2d2af9e04d2d6a42e253c2e3d1088ebeac191d (patch) | |
| tree | 0111fe5a122a85599094cadc31b59c772e06235d /sys/miscfs | |
| parent | d961b8d40f80403ba52f37e63e77b60480d4587e (diff) | |
Restrict umap mounts to root. Letting any user use this has security
implications.
Diffstat (limited to 'sys/miscfs')
| -rw-r--r-- | sys/miscfs/umapfs/umap_vfsops.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/miscfs/umapfs/umap_vfsops.c b/sys/miscfs/umapfs/umap_vfsops.c index f7841d5d82c..f0c556fc1f9 100644 --- a/sys/miscfs/umapfs/umap_vfsops.c +++ b/sys/miscfs/umapfs/umap_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: umap_vfsops.c,v 1.20 1999/02/26 23:44:46 wrstuden Exp $ */ +/* $NetBSD: umap_vfsops.c,v 1.21 1999/03/12 18:16:44 bouyer Exp $ */ /* * Copyright (c) 1992, 1993 @@ -90,6 +90,10 @@ umapfs_mount(mp, path, data, ndp, p) size_t size; int error; + /* only for root */ + if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) + return error; + #ifdef UMAPFS_DIAGNOSTIC printf("umapfs_mount(mp = %p)\n", mp); #endif |
