diff options
author | Brian Somers <brian@FreeBSD.org> | 1998-05-07 00:39:56 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 1998-05-07 00:39:56 +0000 |
commit | a95587674c67e74d3ee696fbbb6c5ed711f51df9 (patch) | |
tree | b2238937f4773a04db0bd21a364b493e91066d0c /usr.sbin/syslogd | |
parent | 9b7408fe46f8c67976b72b06eb619b5ad0c11ca1 (diff) | |
download | src-a95587674c67e74d3ee696fbbb6c5ed711f51df9.tar.gz src-a95587674c67e74d3ee696fbbb6c5ed711f51df9.zip |
Make syslogd function in non-secure mode.
Log the correct ^2 packet as per the last commit comment.
Notes
Notes:
svn path=/head/; revision=35819
Diffstat (limited to 'usr.sbin/syslogd')
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 7985aee67459..6a55c355ce3a 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, |