From owner-freebsd-current Tue Sep 4 12: 9:12 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id 364C337B406 for ; Tue, 4 Sep 2001 12:08:59 -0700 (PDT) Received: from hades.hell.gr (patr530-b061.otenet.gr [195.167.121.189]) by mailsrv.otenet.gr (8.11.5/8.11.5) with ESMTP id f84J8sI19196; Tue, 4 Sep 2001 22:08:54 +0300 (EEST) Received: (from charon@localhost) by hades.hell.gr (8.11.6/8.11.6) id f84J6aa23401; Tue, 4 Sep 2001 22:06:36 +0300 (EEST) (envelope-from charon@labs.gr) Date: Tue, 4 Sep 2001 22:06:36 +0300 From: Giorgos Keramidas To: Chris Wicklein Cc: current@FreeBSD.ORG Subject: Re: syslogd: Too many '/' in "/dev//console" Message-ID: <20010904220636.A23124@hades.hell.gr> References: <20010903204142.87BDC37B405@hub.freebsd.org> <20010904030913.EDD0037B407@hub.freebsd.org> <20010904063933.A1625@hades.hell.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010904063933.A1625@hades.hell.gr>; from charon@labs.gr on Tue, Sep 04, 2001 at 06:39:36AM +0300 X-PGP-Fingerprint: 3A 75 52 EB F1 58 56 0D - C5 B8 21 B6 1B 5E 4A C2 X-URL: http://students.ceid.upatras.gr/~keramida/index.html Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG From: Giorgos Keramidas Subject: Re: syslogd: Too many '/' in "/dev//console" Date: Tue, Sep 04, 2001 at 06:39:36AM +0300 > I'm looking at the diffs from Aug 25, so if I come up with sth by > running syslogd with -d, by tomorrow I'll have spotted this in more > detail - probably replying with the patch to fix it too. Off to > buildworld and bed, 'nite all. Running "syslogd -d -s -s" and checking out my usr.sbin/syslogd sources from various dates, I tracked this bug down to changes made between Aug 31 2001 and Sep 1 2001. In my /etc/syslog.conf I changed /dev/console to /dev/ttyvb so that all messages are redirected to /dev/ttyvb (where I would easily spot them, and do not clutter my active console). Here's the output of two builds of syslogd with sources from the dates mentioned: hades!root:[/usr/src/usr.sbin/syslogd]# cvs up -A -P -d -q -D 'Aug 31 2001' hades!root:[/usr/src/usr.sbin/syslogd]# make hades!root:[/usr/src/usr.sbin/syslogd]# make install hades!root:[/usr/src/usr.sbin/syslogd]# syslogd -d -s -s off & running.... init cfline("*.* /var/log/messages", f, "*", "*") cfline("*.* /dev/ttyvb", f, "*", "*") 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 X FILE: /var/log/messages 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 X TTY: /dev/ttyvb logmsg: pri 56, flags 4, from hades, msg syslogd: restart Logging to FILE /var/log/messages Logging to TTY /dev/ttyvb syslogd: restarted ^Csyslogd: exiting on signal 2 syslogd: exiting on signal 2 logmsg: pri 53, flags 4, from hades, msg syslogd: exiting on signal 2 Logging to FILE /var/log/messages Logging to TTY /dev/ttyvb So, the sources of Aug 31 seem to run perfectly fine. Trying the same with the sources of Sep 1, I get the interesting output shown below: hades!root:[/usr/src/usr.sbin/syslogd]# cvs up -A -P -d -q -D 'Sep 1 2001' hades!root:[/usr/src/usr.sbin/syslogd]# make hades!root:[/usr/src/usr.sbin/syslogd]# make install hades!root:[/usr/src/usr.sbin/syslogd]# syslogd -d -s -s off & running.... init cfline("*.* /var/log/messages", f, "*", "*") cfline("*.* /dev/ttyvb", f, "*", "*") 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 X FILE: /var/log/messages 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 X TTY: /dev//ttyvb logmsg: pri 56, flags 4, from hades, msg syslogd: restart Logging to FILE /var/log/messages Logging to TTY /dev//ttyvb syslogd: Too many '/' in "/dev//ttyvb" logmsg: pri 53, flags 4, from hades, msg syslogd: Too many '/' in "/dev//ttyvb" Logging to FILE /var/log/messages Logging to UNUSED syslogd: restarted The following patch seems to have fixed the bug for me. -giorgos [-- start of patch --] Index: syslogd.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/syslogd/syslogd.c,v retrieving revision 1.84 diff -u -r1.84 syslogd.c --- syslogd.c 1 Sep 2001 08:42:49 -0000 1.84 +++ syslogd.c 4 Sep 2001 19:04:25 -0000 @@ -1664,7 +1664,7 @@ f->f_type = F_CONSOLE; else f->f_type = F_TTY; - (void)strlcpy(f->f_un.f_fname, p + sizeof(_PATH_DEV - 1), + (void)strlcpy(f->f_un.f_fname, p + sizeof _PATH_DEV - 1, sizeof(f->f_un.f_fname)); } else { (void)strlcpy(f->f_un.f_fname, p, sizeof(f->f_un.f_fname)); [-- end of patch --] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message