From owner-freebsd-stable Sun Jul 14 3:19:56 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B4B537B400 for ; Sun, 14 Jul 2002 03:19:46 -0700 (PDT) Received: from gatekeeper.radio-do.de (gatekeeper.Radio-do.de [193.101.164.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43D2443E42 for ; Sun, 14 Jul 2002 03:19:45 -0700 (PDT) (envelope-from fn@Radio-do.de) Received: from cube.radio-do.de (cube.Radio-do.de [193.101.164.7]) by gatekeeper.radio-do.de (Postfix) with ESMTP id 0EFBB8E for ; Sun, 14 Jul 2002 12:19:43 +0200 (CEST) Received: from cube.radio-do.de (localhost [127.0.0.1]) by cube.radio-do.de (8.12.3/8.12.3) with ESMTP id g6EAJgem001777 for ; Sun, 14 Jul 2002 12:19:42 +0200 (CEST) (envelope-from fn@Radio-do.de) Received: (from fn@localhost) by cube.radio-do.de (8.12.3/8.12.3/Submit) id g6EAJgPM001776; Sun, 14 Jul 2002 12:19:42 +0200 (CEST) X-Authentication-Warning: cube.radio-do.de: fn set sender to fn@Radio-do.de using -f To: freebsd-stable@FreeBSD.ORG Subject: usbd dumps core after changing /etc/usbd.conf on 4.6-RELEASE-p1 From: Frank Nobis Date: 14 Jul 2002 12:19:42 +0200 Message-ID: Lines: 54 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=-=-= Hi, did anyone see this too?. I changed my /etc/usbd.conf to have additional entries for a Microsoft Intelli Mouse with 3 and 5 Buttons and a wheel. Now the usbd dumps core in read_configuration on line 464 of usbd.c revision 1.10.2.4. This seems to be, because of the whitespace and comment checking part is counting len to zero, while searching for real config lines and skiping the comments etc. But somehow len now become -1 and obviuosly dumps out in strncpy(linez, line, len) A patch may be this: Index: usbd.c =================================================================== RCS file: /net/ga/home2/ncvs/src/usr.sbin/usbd/usbd.c,v retrieving revision 1.10.2.4 diff -c -r1.10.2.4 usbd.c *** usbd.c 24 Feb 2002 14:23:13 -0000 1.10.2.4 --- usbd.c 13 Jul 2002 16:25:40 -0000 *************** *** 449,455 **** len--; } ! if (len == 0) /* empty line */ continue; if (line[0] == '#') /* comment line */ continue; --- 449,455 ---- len--; } ! if (len <= 0) /* empty line */ continue; if (line[0] == '#') /* comment line */ continue; Here is my /etc/usdb.conf which causes that trouble. --=-=-= Content-Disposition: attachment; filename=usbd.conf Content-Description: usbd.conf for Intelli Mouse # Configuration file the USB daemon. # # See usbd.conf(5) for the description of the format of the file. # # $FreeBSD: src/etc/usbd.conf,v 1.5.2.2 2000/10/16 16:32:12 n_hibma Exp $ # Firmware download into the ActiveWire board. After the firmware download is # done the device detaches and reappears as something new and shiny automatically. # device "ActiveWire board, firmware download" vendor 0x0854 product 0x0100 release 0x0000 attach "/usr/local/bin/ezdownload -f /usr/local/share/usb/firmware/0854.0100.0_01.hex ${DEVNAME}" # Firmware download for Entrega Serial DB25 adapter. # device "Entrega Serial with UART" product 0x8001 vendor 0x1645 release 0x0101 attach "if ! kldstat -n usio > /dev/null 2>&1 ; then kldload usio; fi" attach "/usr/sbin/ezdownload -v -f /usr/share/usb/firmware/1645.8001.0101 /dev/${DEVNAME}" # The entry below starts and stops dhclient when an ethernet device is inserted # Caveat: It does not support multiple interfaces (but neither does pccardd, # it shouldn't be too big a deal :-) # device "USB ethernet" devname "[ack]ue[0-9]+" attach "dhclient ${DEVNAME}" detach "killall dhclient" # The entry below starts moused when a mouse is plugged in. Moused # stops automatically (actually it bombs :) when the device disappears. # #device "Microsoft 5-Button Mouse with IntelliEye(TM)" # devname "ums[0-9]+" # product 0x0039 # vendor 0x045e # attach "/usr/sbin/moused -p /dev/${DEVNAME} -I /var/run/moused.${DEVNAME}.pid -z 6 7" device "Microsoft 3-Button Mouse with IntelliEye(TM)" devname "ums[0-9]+" product 0x0040 vendor 0x045e attach "/usr/sbin/moused -p /dev/${DEVNAME} -I /var/run/moused.${DEVNAME}.pid -z 4 5" # The entry below starts moused when a mouse is plugged in. Moused # stops automatically (actually it bombs :) when the device disappears. # device "Mouse" devname "ums[0-9]+" attach "/usr/sbin/moused -p /dev/${DEVNAME} -I /var/run/moused.${DEVNAME}.pid" # The fallthrough entry: Nothing is specified, nothing is done. And it isn't # necessary at all :-). Just for pretty printing in debugging mode. # device "USB device" --=-=-= Greetings Frank Nobis -- .signature is: umop 3p!sdn --=-=-=-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message