mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
Note in log file if messages are being forwarded from a
remote machine. PR: 7055 Submitted by: Edwin Groothus <edwin@nwm.wan.philips.com>
This commit is contained in:
parent
ccc3d3073b
commit
25d0f8a50c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37209
@ -42,7 +42,7 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: syslogd.c,v 1.34 1998/06/24 23:50:20 julian Exp $";
|
||||
"$Id: syslogd.c,v 1.35 1998/06/25 19:39:19 guido Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -796,7 +796,14 @@ fprintlog(f, flags, msg)
|
||||
|
||||
case F_FORW:
|
||||
dprintf(" %s\n", f->f_un.f_forw.f_hname);
|
||||
l = snprintf(line, sizeof line - 1, "<%d>%.15s %s",
|
||||
/* check for local vs remote messages */
|
||||
if (strcmp(f->f_prevhost, LocalHostName))
|
||||
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);
|
||||
else
|
||||
l = snprintf(line, sizeof line - 1, "<%d>%.15s %s",
|
||||
f->f_prevpri, iov[0].iov_base, iov[4].iov_base);
|
||||
if (l > MAXLINE)
|
||||
l = MAXLINE;
|
||||
|
Loading…
Reference in New Issue
Block a user