From andre.albsmeier@mchp.siemens.de  Sun Jul 26 23:46:09 1998
Received: from david.siemens.de (david.siemens.de [192.35.17.14])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA19970
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 26 Jul 1998 23:46:07 -0700 (PDT)
          (envelope-from andre.albsmeier@mchp.siemens.de)
Received: from mail.siemens.de (salomon.siemens.de [139.23.33.13])
	by david.siemens.de (8.9.1/8.9.1) with ESMTP id IAA16248
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 27 Jul 1998 08:43:47 +0200 (MET DST)
Received: from curry.mchp.siemens.de (daemon@curry.mchp.siemens.de [146.180.31.23])
	by mail.siemens.de (8.9.1/8.9.1) with ESMTP id IAA26410
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 27 Jul 1998 08:45:32 +0200 (MET DST)
Received: (from daemon@localhost)
	by curry.mchp.siemens.de (8.8.8/8.8.8) id IAA00796
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 27 Jul 1998 08:45:34 +0200 (CEST)
Message-Id: <199807270645.IAA28545@internal>
Date: Mon, 27 Jul 1998 08:45:30 +0200 (CEST)
From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: FreeBSD-gnats-submit@freebsd.org, Harlan.Stenn@pfcs.com, phk@freebsd.org
Subject: small fix for new syslogd options
X-Send-Pr-Version: 3.2

>Number:         7407
>Category:       bin
>Synopsis:       small fix for new syslogd options
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 26 23:50:01 PDT 1998
>Closed-Date:    Mon Jul 27 06:04:27 PDT 1998
>Last-Modified:  Mon Jul 27 06:04:43 PDT 1998
>Originator:     Andre Albsmeier
>Release:        FreeBSD 2.2.7-STABLE i386
>Organization:
>Environment:

FreeBSD STABLE but the code actually is from current.

>Description:

Harlan.Stenn@pfcs.com added two (very interesting) options to syslogd for
-current (Thanks Harald). However, on my attempt to try this on -STABLE,
I found that when forwarding to another host the actual messages gets lost.
This is due to a wrong index because when the -v option was added, the
indexes shifted one place.

Please, because I am actually using -STABLE, I were very glad if the
new syslogd.c would be commited to -STABLE also. I didn't find any other
problems running the new code on -STABLE the last days. In this case
please don't forget the man-pages and the small change in usr.bin/wall/ttymsg.c

Thanks.

>How-To-Repeat:

Take the new syslogd and log to another host.

>Fix:
	
--- syslogd.c.ORI	Mon Jul 27 08:28:27 1998
+++ syslogd.c	Mon Jul 27 08:27:43 1998
@@ -863,10 +863,10 @@
 			l = snprintf(line, sizeof line - 1,
 			    "<%d>%.15s Forwarded from %s: %s",
 			    f->f_prevpri, iov[0].iov_base, f->f_prevhost,
-			    iov[4].iov_base);
+			    iov[5].iov_base);
 		else
 			l = snprintf(line, sizeof line - 1, "<%d>%.15s %s",
-			     f->f_prevpri, iov[0].iov_base, iov[4].iov_base);
+			     f->f_prevpri, iov[0].iov_base, iov[5].iov_base);
 		if (l > MAXLINE)
 			l = MAXLINE;
 		if ((finet >= 0) &&
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Mon Jul 27 06:04:27 PDT 1998 
State-Changed-Why:  
fixed, thanks! 
>Unformatted:
