NetBSD Problem Report #9392
Received: (qmail 17800 invoked from network); 11 Feb 2000 21:14:14 -0000
Message-Id: <200002112113.WAA25795@rlanarh108.uni-c.dk>
Date: Fri, 11 Feb 2000 22:13:59 +0100 (CET)
From: erik@mediator.uni-c.dk
Reply-To: erik@mediator.uni-c.dk
To: gnats-bugs@gnats.netbsd.org
Subject: lpq and friends segfault when remote printer has no hostname
X-Send-Pr-Version: 3.95
>Number: 9392
>Category: bin
>Synopsis: lpq and friends segfault when remote printer has no hostname
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: itojun
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 11 13:15:01 +0000 2000
>Closed-Date: Mon Dec 04 08:41:43 +0000 2000
>Last-Modified: Mon Dec 04 08:41:43 +0000 2000
>Originator: Erik Bertelsen
>Release: NetBSD-current 11 Feb 2000
>Organization:
>Environment:
System: NetBSD rlanarh108.uni-c.dk 1.4S NetBSD 1.4S (HJEMME) #308: Fri Feb 11 19:07:04 CET 2000 erik@rlanarh108.uni-c.dk:/home/src/sys/arch/macppc/compile/HJEMME macppc
>Description:
lpq and other lpr-related programs will segfault when querying a remote printer,
whose rm-entry in /etc/printcap is given as a dotted-decimal IP address instead of
as a symbolic name (from dns or /etc/hosts).
The culprit is the following code in lpr/common_source/common.c, where ai_canonname
will be NULL in this case:
/*
* if the two hosts are not the same,
* then the printer must be remote.
*/
if (strcasecmp(hname, res->ai_canonname) != 0)
remote = 1;
This code was changed about 27 January (IPv6 support, IIRC), but I don't know whether
this problem existed before that date.
>How-To-Repeat:
>Fix:
best regards
Erik Bertelsen
>Release-Note:
>Audit-Trail:
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
To: gnats-bugs@gnats.netbsd.org
Cc: erik@mediator.uni-c.dk
Subject: Re: bin/9392
Date: Sat, 26 Aug 2000 18:00:27 +0900
(numeric hostname in "rp" field of /etc/printcap)
i suppose the problem is no longer there, due to other code changes.
could you confirm?
itojun
State-Changed-From-To: open->feedback
State-Changed-By: itojun
State-Changed-When: Sun Aug 27 01:51:25 PDT 2000
State-Changed-Why:
should be fixed by now, waitin for confirmation
Responsible-Changed-From-To: bin-bug-people->itojun
Responsible-Changed-By: itojun
Responsible-Changed-When: Sun Aug 27 01:51:25 PDT 2000
Responsible-Changed-Why:
mine
State-Changed-From-To: feedback->closed
State-Changed-By: itojun
State-Changed-When: Mon Dec 4 00:41:29 PST 2000
State-Changed-Why:
should be okay by now, please re-submit if there still is a problem
>Unformatted:
(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.