Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Mar 2016 13:04:29 +0000 (UTC)
From:      Mark Felder <feld@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r411393 - in head/security/sshguard: . files
Message-ID:  <201603191304.u2JD4Tcj077669@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: feld
Date: Sat Mar 19 13:04:29 2016
New Revision: 411393
URL: https://svnweb.freebsd.org/changeset/ports/411393

Log:
  security/sshguard: Add patch to prevent log flooding with error messages
  
  PR:		208133

Added:
  head/security/sshguard/files/patch-src_sshguard__logsuck.c   (contents, props changed)
Modified:
  head/security/sshguard/Makefile

Modified: head/security/sshguard/Makefile
==============================================================================
--- head/security/sshguard/Makefile	Sat Mar 19 11:47:28 2016	(r411392)
+++ head/security/sshguard/Makefile	Sat Mar 19 13:04:29 2016	(r411393)
@@ -3,7 +3,7 @@
 
 PORTNAME=	sshguard
 PORTVERSION=	1.6.3
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	security
 MASTER_SITES=	SF/sshguard/sshguard/${PORTVERSION}
 

Added: head/security/sshguard/files/patch-src_sshguard__logsuck.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/sshguard/files/patch-src_sshguard__logsuck.c	Sat Mar 19 13:04:29 2016	(r411393)
@@ -0,0 +1,36 @@
+--- src/sshguard_logsuck.c.orig	2015-08-19 16:11:25 UTC
++++ src/sshguard_logsuck.c
+@@ -92,8 +92,6 @@ int logsuck_add_logsource(const char *re
+         return -1;
+     }
+ 
+-    sshguard_log(LOG_DEBUG, "Adding '%s' to polled files.", filename);
+-
+     /* store filename */
+     strcpy(cursource.filename, filename);
+ 
+@@ -185,7 +183,6 @@ int logsuck_getline(char *restrict buf, 
+             }
+         }
+         /* no data. Wait for something with exponential backoff, up to LOGSUCK_MAX_WAIT */
+-        sshguard_log(LOG_DEBUG, "Sleeping %d ms before next poll.", sleep_interval);
+         usleep(sleep_interval * 1000);
+         /* update sleep interval for next call */
+         if (sleep_interval < MAX_LOGPOLL_INTERVAL) {
+@@ -274,7 +271,6 @@ static int refresh_files() {
+         ++numchanged;
+         if (! myentry->active) {
+             /* entry was inactive, now available. Resume it */
+-            sshguard_log(LOG_NOTICE, "Source '%s' reappeared. Reloading.", myentry->filename);
+         } else {
+             /* rotated (ie myentry->current_serial_number != fileinfo.st_ino) */
+             sshguard_log(LOG_NOTICE, "Reloading rotated file %s.", myentry->filename);
+@@ -285,8 +281,6 @@ static int refresh_files() {
+         /* descriptor and source ready! */
+     }
+     list_iterator_stop(& sources_list);
+-
+-    sshguard_log(LOG_INFO, "Refreshing sources showed %u changes.", numchanged);
+     return 0;
+ }
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603191304.u2JD4Tcj077669>