hi,

if you use tcpwrapper every connection gets logged.
without tcpwrapper this only happens if "-a" is specified at the
commandline. i dont think this is really intended.

The patch to fix that seems pretty easy:
[[[
Index: agent/snmp_agent.c
===================================================================
--- agent/snmp_agent.c.orig
+++ agent/snmp_agent.c
@@ -824,7 +824,9 @@
             *xp = '\0';
  
         if (hosts_ctl(name, STRING_UNKNOWN, sbuf, STRING_UNKNOWN)) {
-            snmp_log(allow_severity, "Connection from %s\n", addr_string);
+            if (log_addresses) {
+                snmp_log(allow_severity, "Connection from %s\n", addr_string);
+            }
         } else {
             snmp_log(deny_severity, "Connection from %s REFUSED\n",
                      addr_string);
]]]

comments? critics?

darix

-- 
          openSUSE - SUSE Linux is my linux
              openSUSE is good for you
                  www.opensuse.org
Index: agent/snmp_agent.c
===================================================================
--- agent/snmp_agent.c.orig
+++ agent/snmp_agent.c
@@ -824,7 +824,9 @@
             *xp = '\0';
  
         if (hosts_ctl(name, STRING_UNKNOWN, sbuf, STRING_UNKNOWN)) {
-            snmp_log(allow_severity, "Connection from %s\n", addr_string);
+            if (log_addresses) {
+                snmp_log(allow_severity, "Connection from %s\n", addr_string);
+            }
         } else {
             snmp_log(deny_severity, "Connection from %s REFUSED\n",
                      addr_string);

Reply via email to