From owner-freebsd-bugs Fri Jan 31 13:40:24 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86D5637B409 for ; Fri, 31 Jan 2003 13:40:21 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90D8A43F93 for ; Fri, 31 Jan 2003 13:40:20 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h0VLeKNS077747 for ; Fri, 31 Jan 2003 13:40:20 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h0VLeKwo077746; Fri, 31 Jan 2003 13:40:20 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 013AE37B401 for ; Fri, 31 Jan 2003 13:37:13 -0800 (PST) Received: from roadrunner.rominet.net (ATuileries-109-1-2-242.abo.wanadoo.fr [80.13.122.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id A44D843FAF for ; Fri, 31 Jan 2003 13:37:11 -0800 (PST) (envelope-from at@rominet.net) Received: by roadrunner.rominet.net (Postfix, from userid 1000) id D0820816F; Fri, 31 Jan 2003 22:37:09 +0100 (CET) Message-Id: <20030131213709.D0820816F@roadrunner.rominet.net> Date: Fri, 31 Jan 2003 22:37:09 +0100 (CET) From: Alain Thivillon Reply-To: Alain Thivillon To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/47770: whois client does not chase referreal of new .ORG Registry Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 47770 >Category: bin >Synopsis: whois client does not chase referreal of new .ORG Registry >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jan 31 13:40:20 PST 2003 >Closed-Date: >Last-Modified: >Originator: Alain Thivillon >Release: FreeBSD 4.7-RC i386 >Organization: Rominet Networks Inc. >Environment: System: FreeBSD roadrunner.rominet.net 4.7-RC FreeBSD 4.7-RC #7: Tue Sep 24 16:32:14 CEST 2002 titi@roadrunner.rominet.net:/usr/obj/usr/src/sys/ROADRUNNER i386 >Description: whois client does not track "Whois Server:" line of new .ORG registry, and authoritative whois server is not queried. >How-To-Repeat: % whois domain.org outputs only registrar data ... Registrant Street1:Whois Server:whois.gandi.net ... >Fix: Patch below works on 31/01/2003 with current .ORG registry format. --- ./usr.bin/whois/whois.c.old Sun Nov 17 16:05:55 2002 +++ ./usr.bin/whois/whois.c Fri Jan 31 22:28:58 2003 @@ -74,6 +74,7 @@ #define SNICHOST "whois.6bone.net" #define BNICHOST "whois.registro.br" #define WHOIS_SERVER_ID "Whois Server: " +#define WHOIS_ORG_SERVER_ID "Registrant Street1:Whois Server:" #define WHOIS_RECURSE 0x01 #define WHOIS_QUICK 0x02 @@ -290,7 +291,20 @@ } s_asprintf(&nhost, "%.*s", (int)(buf + len - host), host); - } else if (strcmp(hostname, ANICHOST) == 0) { + } + else if ((host = strnstr(buf, WHOIS_ORG_SERVER_ID, len)) + != NULL) { + host += sizeof(WHOIS_ORG_SERVER_ID) - 1; + for (p = host; p < buf + len; p++) { + if (!ishost(*p)) { + *p = '\0'; + break; + } + } + s_asprintf(&nhost, "%.*s", + (int)(buf + len - host), host); + } + else if (strcmp(hostname, ANICHOST) == 0) { for (c = 0; c <= len; c++) buf[c] = tolower((int)buf[c]); for (i = 0; ip_whois[i] != NULL; i++) { >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message