Subject: bin/5535: mount_umap doesn't properly read group map file
To: None <gnats-bugs@gnats.netbsd.org, perseant@hitl.washington.edu>
From: None <perseant@hitl.washington.edu>
List: netbsd-bugs
Date: 06/03/1998 13:48:44
>Number:         5535
>Category:       bin
>Synopsis:       mount_umap overwrites data from the group map file with last uid
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun  3 13:50:00 1998
>Last-Modified:
>Originator:     Konrad Schroder
>Organization:
-------------------------------------------------------------------------
Konrad Schroder           http://www.hitl.washington.edu/people/perseant/
System Administrator                         perseant@hitl.washington.edu
Human Interface Technology Lab                      Voice: (206) 616-1478
Box 352142, University of Washington, 98195, USA      FAX: (206) 543-5380
>Release:        Wed Jun  3 13:42:18 PDT 1998
>Environment:
System: NetBSD ftp 1.3.2 NetBSD 1.3.2 (HITL_SUN4M) #1: Wed May 27 13:22:52 PDT 1998 perseant@ftp:/usr/src/sys/arch/sparc/compile/HITL_SUN4M sparc
>Description:
	The code for mount_umap uses temporary variables d1 and d2 to read
	data into while parsing the uid map file; these variables are then
	copied into the umap.  When parsing the gid map file, fscanf reads
	directly into gmapdata[count]...but then d1 and d2 are copied in
	anyway, overwriting the gid map with the last uid map.
>How-To-Repeat:
	Compile with UMAP_DIAGNOSTIC, and use mount_umap...watch the error
	pop up on console.
>Fix:
*** mount_umap.c.dist   Wed Jun 03 13:39:10 1998
--- mount_umap.c        Wed Jun 03 13:39:38 1998
***************
*** 220,225 ****
                            gmapfile, count + 2, not);
                }
-               gmapdata[count][0] = d1;
-               gmapdata[count][1] = d2;
        }
  
--- 220,223 ----
>Audit-Trail:
>Unformatted: