-Coders,

snmptrapd in net-snmp 5.3 and later was meant to ship with a new "-A" option to
append to the logfile rather than truncating it. From "cvs log 
apps/snmptrapd.c":

revision 5.65
date: 2005/12/04 18:38:08;  author: rstory;  state: Exp;  lines: +36 -57
- add log file append (-A) option

Indeed, '-A' is handled in apps/snmptrapd.c:

        case 'A':
            netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
                                   NETSNMP_DS_LIB_APPEND_LOGFILES, 1);
            break;

However, as correctly noted in bug #1587759, we've actually missed to add "-A"
to the list of legal options! Patch #1598968, submitted by Peter Eckel and
attached here, fixes this. I've applied it to the 5.3.x branch and I'm calling
for votes to also fix this for 5.4.


+Thomas

-- 
Thomas Anders (thomas.anders at blue-cable.de)
diff -ur net-snmp-5.4.rc3/apps/snmptrapd.c net-snmp-5.4.rc3-patch-1587759/apps/snmptrapd.c
--- net-snmp-5.4.rc3/apps/snmptrapd.c   2006-09-19 16:45:29.000000000 +0200
+++ net-snmp-5.4.rc3-patch-1587759/apps/snmptrapd.c     2006-11-18 21:14:17.000000000 +0100
@@ -309,6 +309,7 @@
     fprintf(stderr, "\tEmail:    [EMAIL PROTECTED]");
     fprintf(stderr, "\n");
     fprintf(stderr, "  -a\t\t\tignore authentication failure traps\n");
+    fprintf(stderr, "  -A\t\t\tappend to log file rather than truncating it\n");
     fprintf(stderr, "  -c FILE\t\tread FILE as a configuration file\n");
     fprintf(stderr,
             "  -C\t\t\tdo not read the default configuration files\n");
@@ -656,7 +657,7 @@
 main(int argc, char *argv[])
 #endif
 {
-    char            options[128] = "ac:CdD::efF:g:hHI:L:m:M:no:O:PqsS:tu:vx:-:";
+    char            options[128] = "aAc:CdD::efF:g:hHI:L:m:M:no:O:PqsS:tu:vx:-:";
     netsnmp_session *sess_list = NULL, *ss = NULL;
     netsnmp_transport *transport = NULL;
     int             arg, i = 0, depmsg = 0;

 	  	 
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to