summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syslogd/syslogd.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-05-07 00:39:56 +0000
committerbrian <brian@FreeBSD.org>1998-05-07 00:39:56 +0000
commit5cc7cdec73ff1d569692354518a245f4adf041dc (patch)
treef4daaf949f8a5d40edbf2f90e213ca9a0f0cf83c /usr.sbin/syslogd/syslogd.c
parentd07b83de55fba91dc799d99c36b792dcfb2d9430 (diff)
downloadFreeBSD-src-5cc7cdec73ff1d569692354518a245f4adf041dc.zip
FreeBSD-src-5cc7cdec73ff1d569692354518a245f4adf041dc.tar.gz
Make syslogd function in non-secure mode.
Log the correct ^2 packet as per the last commit comment.
Diffstat (limited to 'usr.sbin/syslogd/syslogd.c')
-rw-r--r--usr.sbin/syslogd/syslogd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 7985aee..6a55c35 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -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.29 1998/04/22 06:28:18 phk Exp $";
+ "$Id: syslogd.c,v 1.30 1998/04/24 17:32:23 phk Exp $";
#endif /* not lint */
/*
@@ -248,7 +248,7 @@ int Initialized = 0; /* set when we have initialized ourselves */
int MarkInterval = 20 * 60; /* interval between marks in seconds */
int MarkSeq = 0; /* mark sequence number */
int SecureMode = 0; /* when true, receive only unix domain socks */
-int Vogons = 0; /* packets arriving in SecureMode */
+u_int Vogons = 0; /* packets arriving in SecureMode */
int created_lsock = 0; /* Flag if local socket created */
char bootfile[MAXLINE+1]; /* booted kernel file */
@@ -385,8 +385,8 @@ main(argc, argv)
logerror("bind");
if (!Debug)
die(0);
+ } else
inetm = FDMASK(finet);
- }
}
if ((fklog = open(_PATH_KLOG, O_RDONLY, 0)) >= 0)
@@ -458,7 +458,7 @@ main(argc, argv)
(struct sockaddr *)&frominet, &len);
if (SecureMode) {
Vogons++;
- if (Vogons & (Vogons + 1)) {
+ if (!(Vogons & (Vogons - 1))) {
(void)snprintf(line, sizeof line,
"syslogd: discarded %d unwanted packets in secure mode", Vogons);
logmsg(LOG_SYSLOG|LOG_AUTH, line,
OpenPOWER on IntegriCloud