From gpalmer@orion.webspan.net  Thu Sep 19 23:03:44 1996
Received: from orion.webspan.net (root@orion.webspan.net [206.154.70.41])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id XAA12952
          for <freebsd-gnats-submit@freebsd.org>; Thu, 19 Sep 1996 23:03:43 -0700 (PDT)
Received: from localhost (gpalmer@localhost [127.0.0.1]) 
          by orion.webspan.net (8.7.5/8.6.12) with SMTP id CAA03411
          for <freebsd-gnats-submit@freebsd.org>; Fri, 20 Sep 1996 02:03:41 -0400 (EDT)
Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.18]) 
          by orion.webspan.net (8.7.5/8.6.12) with ESMTP id BAA02257
          for <gpalmer@webspan.net>; Fri, 20 Sep 1996 01:53:38 -0400 (EDT)
Received: (from nobody@localhost)
          by freefall.freebsd.org (8.7.5/8.7.3) id WAA08171;
          Thu, 19 Sep 1996 22:53:29 -0700 (PDT)
Message-Id: <199609200553.WAA08171@freefall.freebsd.org>
Date: Thu, 19 Sep 1996 22:53:29 -0700 (PDT)
From: miz@pa.aix.or.jp
To: freebsd-gnats-submit@freebsd.org
Subject: cannot umount the node ending '/' when it was mounted
X-Send-Pr-Version: www-1.0

>Number:         1653
>Category:       bin
>Synopsis:       cannot umount the node ending '/' when it was mounted
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 19 23:10:02 PDT 1996
>Closed-Date:    Mon Feb 24 23:02:06 PST 1997
>Last-Modified:  Mon Feb 24 23:06:29 PST 1997
>Originator:     SAWADA Mizuki
>Release:        FreeBSD 2.2-960612-SNAP i386
>Organization:
University of Electro Communications
>Environment:

>Description:
In mounting filesystem, If specify the node using relative path or '/'
ended style, cannot unmount the filesystem using /sbin/umount.
>How-To-Repeat:
# mount -t procfs /proc /proc/
# umount /proc/
>Fix:
The cause of this problem is /sbin/umount is calling `realpath()' to
the node arg, so we can fix this problem if we make /sbin/umount not
to call `realpath()' like this patch for the time being. But I think
each `mount_*' command should take responsibility for this problem.

*** umount.c.orig	Tue May 30 15:10:04 1995
--- umount.c	Fri Sep 20 04:11:18 1996
***************
*** 185,198 ****
  	struct timeval pertry, try;
  	CLIENT *clp;
  	int so, type;
! 	char *delimp, *hostp, *mntpt, rname[MAXPATHLEN];
!
! 	if (realpath(name, rname) == NULL) {
! 		/* Continue and let the system call check it... */
! 		strcpy(rname, name);
! 	}
! 
! 	name = rname;
  
  	if (stat(name, &sb) < 0) {
  		if (((mntpt = getmntname(name, MNTFROM, &type)) == NULL) &&
--- 185,191 ----
  	struct timeval pertry, try;
  	CLIENT *clp;
  	int so, type;
! 	char *delimp, *hostp, *mntpt;
  
    	if (stat(name, &sb) < 0) {
  		if (((mntpt = getmntname(name, MNTFROM, &type)) == NULL) &&
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mpp 
State-Changed-When: Mon Feb 24 23:02:06 PST 1997 
State-Changed-Why:  
This behaviour is correct.  The paths passed to mount are cleaned up 
by a call to realpath() for a reason, and removing the call 
would not be a good idea. 
>Unformatted:
