Subject: kern/1699: umapfs crashes
To: None <gnats-bugs@gnats.netbsd.org>
From: None <carrel@cisco.com>
List: netbsd-bugs
Date: 10/26/1995 23:57:23
>Number:         1699
>Category:       kern
>Synopsis:       umapfs crashes (and the man page is bad too)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 27 03:20:02 1995
>Last-Modified:
>Originator:     David Carrel
>Organization:
	The Toolshed
>Release:        NetBSD-current sup-ed 26 Oct 95
>Environment:
System: NetBSD spy 1.1_ALPHA NetBSD 1.1_ALPHA (DAVE) #15: Thu Oct 26 23:32:03 PDT 1995 carrel@spy:/.a/haydon/home/NetBSD/src/sys/arch/i386/compile/DAVE i386


>Description:
	The umap files system crashes.  I can cause it from several places,
but the most easily reproducible is when I unmount the file system.  Also
the Man page is out of date
>How-To-Repeat:
	mount a umap file system and unmount it.
>Fix:
This patch fixes things for me.  (I included the man page change as well.)

*** sbin/mount_umap/mount_umap.8.orig	Thu Oct 26 23:40:44 1995
--- sbin/mount_umap/mount_umap.8	Thu Oct 26 23:47:58 1995
***************
*** 46,55 ****
  .Sh SYNOPSIS
  .Nm mount_umap
  .Op Fl o Ar options
! .Ar target
! .Ar mount-point
  .Ar uid-mapfile
  .Ar gid-mapfile
  .Sh DESCRIPTION
  The
  .Nm mount_umap
--- 46,57 ----
  .Sh SYNOPSIS
  .Nm mount_umap
  .Op Fl o Ar options
! -u
  .Ar uid-mapfile
+ -g
  .Ar gid-mapfile
+ .Ar target
+ .Ar mount-point
  .Sh DESCRIPTION
  The
  .Nm mount_umap
*** sys/miscfs/umapfs/umap_subr.c.orig	Thu Oct 26 23:39:30 1995
--- sys/miscfs/umapfs/umap_subr.c	Thu Oct 26 23:39:35 1995
***************
*** 394,399 ****
--- 394,403 ----
  	gid_t gid;
  	u_long *usermap, *groupmap;
  
+ 	if (credp == NOCRED) {
+ 		return;
+ 	}
+ 
  	unentries =  MOUNTTOUMAPMOUNT(v_mount)->info_nentries;
  	usermap =  &(MOUNTTOUMAPMOUNT(v_mount)->info_mapdata[0][0]);
  	gnentries =  MOUNTTOUMAPMOUNT(v_mount)->info_gnentries;
>Audit-Trail:
>Unformatted: