From owner-freebsd-bugs Thu Sep 19 23:10:09 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA16156 for bugs-outgoing; Thu, 19 Sep 1996 23:10:09 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA16139; Thu, 19 Sep 1996 23:10:05 -0700 (PDT) Resent-Date: Thu, 19 Sep 1996 23:10:05 -0700 (PDT) Resent-Message-Id: <199609200610.XAA16139@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, 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" ; 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 ; 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 ; 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 X-Send-Pr-Version: www-1.0 Subject: bin/1653: cannot umount the node ending '/' when it was mounted Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Sep 19 23:10:02 PDT 1996 >Last-Modified: >Originator: SAWADA Mizuki >Organization: University of Electro Communications >Release: FreeBSD 2.2-960612-SNAP i386 >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) && >Audit-Trail: >Unformatted: