Date: Thu, 19 Sep 1996 22:53:29 -0700 (PDT) From: miz@pa.aix.or.jp To: freebsd-gnats-submit@freebsd.org Subject: bin/1653: cannot umount the node ending '/' when it was mounted Message-ID: <199609200553.WAA08171@freefall.freebsd.org> Resent-Message-ID: <199609200610.XAA16139@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609200553.WAA08171>
