diff options
author | imp <imp@FreeBSD.org> | 1999-03-12 19:40:39 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1999-03-12 19:40:39 +0000 |
commit | 2342c41cd57f9443563480fc50cd81f5d39cd9a5 (patch) | |
tree | b15823e3af42f136225c1a8cd3b52a0203994fe3 /sys/fs | |
parent | 5fa6e11c9ccb152bc1ac89cb2e9324424d5e1992 (diff) | |
download | FreeBSD-src-2342c41cd57f9443563480fc50cd81f5d39cd9a5.zip FreeBSD-src-2342c41cd57f9443563480fc50cd81f5d39cd9a5.tar.gz |
Don't allow anyone except root to mount file systems that map uids.
This can have bad security implications, but the impact on FreeBSD
systems is minimal because this fs isn't in the default kernels and it
is unknown if it even works.
Submitted by: Manuel Bouyer <bouyer@antioche.eu.org> and
Artur Grabowski <art@stacken.kth.se>
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/umapfs/umap_vfsops.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/fs/umapfs/umap_vfsops.c b/sys/fs/umapfs/umap_vfsops.c index 03b4cb4..3ad41cf 100644 --- a/sys/fs/umapfs/umap_vfsops.c +++ b/sys/fs/umapfs/umap_vfsops.c @@ -35,7 +35,7 @@ * * @(#)umap_vfsops.c 8.8 (Berkeley) 5/14/95 * - * $Id: umap_vfsops.c,v 1.22 1998/05/06 05:29:36 msmith Exp $ + * $Id: umap_vfsops.c,v 1.23 1998/09/07 13:17:01 bde Exp $ */ /* @@ -95,6 +95,12 @@ umapfs_mount(mp, path, data, ndp, p) int i; #endif + /* + * Only for root + */ + if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) + return (error); + #ifdef UMAPFS_DIAGNOSTIC printf("umapfs_mount(mp = %x)\n", mp); #endif |