Subject: bin/22099: umount rhost:path does not work
To: None <gnats-bugs@gnats.netbsd.org>
From: None <uwe@netbsd.org>
List: netbsd-bugs
Date: 07/09/2003 00:47:58
>Number:         22099
>Category:       bin
>Synopsis:       umount rhost:path does not work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 09 00:48:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Valeriy E. Ushakov
>Release:        1.6_STABLE
>Organization:
>Environment:
NetBSD snark 1.6_STABLE NetBSD 1.6_STABLE (SNARK) #1: Sun Jan 12 12:22:00 MSK 2003     uwe@bigmac:/usr/src-release-1-6/sys/arch/sparc/compile/SNARK sparc
>Description:
umount(8) claims that we support

	$ umount rhost:path

but a call to realpath(3) early in umount.c:umountfs() fails for rhost:path and
umount returns with an error.

This has another annoying side effect.  swapctl -U tries to umount the swap
mount point using umount rhost:path syntax and fails.
>How-To-Repeat:
Try to umount an nfs-mounted filesystem using umount rhost:path syntax.

>Fix:
Not really a fix, but for swapctl(8) the workaround is to pass
the mount point to the umount:

Index: swapctl.c
===================================================================
RCS file: /cvsroot/src/sbin/swapctl/swapctl.c,v
retrieving revision 1.22
diff -u --unified -r1.22 swapctl.c
--- swapctl.c	2003/06/23 11:53:44	1.22
+++ swapctl.c	2003/07/09 00:43:10
@@ -503,7 +503,7 @@
 				}
 			} else {
 				snprintf(cmd, sizeof(cmd), "%s %s",
-					PATH_UMOUNT, fp->fs_spec);
+					PATH_UMOUNT, spec);
 			}
 		} else {
 			/*

>Release-Note:
>Audit-Trail:
>Unformatted: