From owner-freebsd-bugs Sat Mar 13 6:40:49 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id F11E914E09 for ; Sat, 13 Mar 1999 06:40:14 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id GAA01351; Sat, 13 Mar 1999 06:40:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from qn-lpr2-98.quicknet.inet.fi (qn-lpr2-98.quicknet.inet.fi [194.251.102.98]) by hub.freebsd.org (Postfix) with ESMTP id 72C5D14C40 for ; Sat, 13 Mar 1999 06:31:52 -0800 (PST) (envelope-from junki@qn-lpr2-98.quicknet.inet.fi) Received: (from junki@localhost) by qn-lpr2-98.quicknet.inet.fi (8.9.3/8.9.1) id QAA04496; Sat, 13 Mar 1999 16:31:34 +0200 (EET) (envelope-from junki) Message-Id: <199903131431.QAA04496@qn-lpr2-98.quicknet.inet.fi> Date: Sat, 13 Mar 1999 16:31:34 +0200 (EET) From: Juha Nurmela Reply-To: junki@qn-lpr2-98.quicknet.inet.fi To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/10568: dhcp client receives garbage (dhclient prepend) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 10568 >Category: bin >Synopsis: dhcp client receives garbage (dhclient prepend) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Mar 13 06:40:01 PST 1999 >Closed-Date: >Last-Modified: >Originator: Juha Nurmela >Release: FreeBSD 4.0-CURRENT i386 >Organization: ACME Inc. >Environment: Internet Software Consortium DHCP Client V2.0b1pl17 Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved. >Description: Sometimes /etc/resolv.conf gets garbage to the 'search' line. Looks like dhclient has trouble with the 'prepend' configuration and string data. >How-To-Repeat: /etc/dhclient.conf: interface ep0 { prepend domain-name "z "; prepend domain-name-servers 127.0.0.1; script "nonexistent_just_testing_dhclient" } # dhclient -d -D ep0 Now files /tmp/dcs* might contain trash in new_domain_name variable. Varying the length of the z above can reveal or hide the bug. >Fix: *** /usr/src/contrib/isc-dhcp/common/options.c.orig Wed Feb 10 11:10:13 1999 --- /usr/src/contrib/isc-dhcp/common/options.c Sat Mar 13 02:21:08 1999 *************** *** 518,525 **** --- 518,530 ---- case 't': if (emit_quotes) *op++ = '"'; + #if 0 strcpy (op, (char *)dp); op += strlen ((char *)dp); + #else + while (len-- && *dp) + *op++ = *dp++; + #endif if (emit_quotes) *op++ = '"'; *op = 0; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message