Subject: kern/3175: umapfs group map incorrect
To: None <gnats-bugs@gnats.netbsd.org>
From: None <yasufu-i@is.aist-nara.ac.jp>
List: netbsd-bugs
Date: 02/02/1997 01:31:02
>Number:         3175
>Category:       kern
>Synopsis:       umapfs group map incorrect
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb  1 08:35:00 1997
>Last-Modified:
>Originator:     ITOH, Yasufumi
>Organization:
	Nara Institute of Science and Technology, Nara, Japan.
>Release:        1.2
>Environment:
System: NetBSD acha.my.domain 1.2 NetBSD 1.2 (ACHA) #3: Mon Jan 20 19:09:45 JST 1997 brx@acha.my.domain:/usr/src/sys/arch/x68k/compile/ACHA x68k


>Description:
If the number of map entries of group-id differs from
that of user-id, the group mapping doesn't work correct.

>How-To-Repeat:
Here are two files, named "uidmap" and "gidmap"

uidmap:
2
0	0
1	10

gidmap:
3
0	0
1	10
2	100

then, the command

# mount_umap -u uidmap -g gidmap /from /to

does uid/gid mapping, but the group mapping 2 <-> 100 doesn't work.

>Fix:
The following patch fixes THIS problem.

However, using the umapfs (especially with amd) frequently cause
panics "panic: vnode_pager_uncache: vnode not locked!" (on unmounting?)
even if this patch is applyed....  This is why the priority is low....

diff -uF^[a-zA-Z_][a-z 	A-Z0-9_]*(.*[^;]$ umap_vfsops.c.orig umap_vfsops.c
--- umap_vfsops.c.orig	Sat Feb 10 07:41:05 1996
+++ umap_vfsops.c	Fri Jan 17 02:14:50 1997
@@ -158,7 +158,7 @@ umapfs_mount(mp, path, data, ndp, p)
 #endif
 
 	error = copyin(args.gmapdata, (caddr_t)amp->info_gmapdata, 
-	    2*sizeof(u_long)*args.nentries);
+	    2*sizeof(u_long)*args.gnentries);
 	if (error)
 		return (error);
 
>Audit-Trail:
>Unformatted: