NetBSD Problem Report #758

From gnats  Sat Jan 28 11:07:48 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id LAA15449 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sat, 28 Jan 1995 11:07:48 -0800
Message-Id: <199501281850.NAA00489@kolvir.blrc.ma.us>
Date: Sat, 28 Jan 1995 13:50:01 -0500
From: John Kohl <jtk@kolvir.blrc.ma.us>
Reply-To: jtk@kolvir.blrc.ma.us
To: gnats-bugs@NetBSD.ORG
Subject: unmount tries to gethostbyname() on union mount fake names
X-Send-Pr-Version: 3.2

>Number:         758
>Category:       bin
>Synopsis:       unmount tries to gethostbyname() on union mount fake names
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 28 11:20:01 +0000 1995
>Closed-Date:    Sat Mar 11 08:07:03 +0000 1995
>Last-Modified:  
>Originator:     John Kohl
>Release:        -current, as of Jan 21
>Organization:
NetBSD Kernel Hackers `R` Us
>Environment:

System: NetBSD kolvir 1.0A NetBSD 1.0A (KOLVIR) #0: Sat Jan 28 13:28:18 EST 1995 jtk@kolvir:/u1/NetBSD-current/src/sys/arch/i386/compile/KOLVIR i386


>Description:
When umount tries to unmount a union mounted file system, it will try to
gethostbyname() on the "<below>" or "<above>" tag.  This can hang a long
time if you have a nameserver configured but no network connectivity at
the moment (e.g. what I have at home when PPP is not connected).

>How-To-Repeat:
Do a union mount, and try to unmount.  Watch the nameserver lookups fly
by, (or wait a long time for the timeouts if you're disconnected)

>Fix:
Only do the lookup for type NFS mounts.

--- 1.1	1995/01/28 18:41:38
+++ src/sbin/umount/umount.c	1995/01/28 18:46:28
@@ -216,6 +216,8 @@
 	if (!selected(type))
 		return (1);

+	hp = NULL;
+	if (strcmp(type, "nfs") == 0) {
 	if ((delimp = strchr(name, '@')) != NULL) {
 		hostp = delimp + 1;
 		*delimp = '\0';
@@ -227,8 +229,8 @@
 		hp = gethostbyname(hostp);
 		name = delimp + 1;
 		*delimp = ':';
-	} else
-		hp = NULL;
+	    }
+	}
 	if (!namematch(hp))
 		return (1);


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Sat Mar 11 00:07:03 PST 1995 
State-Changed-Why:  
This was fixed some time ago. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.