summaryrefslogtreecommitdiffstats
path: root/web/attachments/137019-nagios-plugins-snmp-v2c.patch
blob: c3aaa60fb3a90b3077bde8de34ce3c120462153c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff -Naur nagios-plugins-1.4.orig/plugins/check_snmp.c nagios-plugins-1.4/plugins/check_snmp.c
--- nagios-plugins-1.4.orig/plugins/check_snmp.c	2005-01-20 17:03:56.000000000 -0800
+++ nagios-plugins-1.4/plugins/check_snmp.c	2005-06-02 13:05:51.000000000 -0700
@@ -646,6 +646,9 @@
 		asprintf(&proto, DEFAULT_PROTOCOL);
 		asprintf(&authpriv, "%s%s", "-c ", community);
 	}
+	else if ( strcmp (proto, "2c") == 0 ) {                 /* snmpv2c args */
+		asprintf(&authpriv, "%s%s", "-c ", community);
+	}
 	else if ( strcmp (proto, "3") == 0 ) {                 /* snmpv3 args */
 		asprintf(&proto, "%s", "3");
 		
@@ -859,7 +862,7 @@
 
 	/* SNMP and Authentication Protocol */
 	printf (_("\
- -P, --protocol=[1|3]\n\
+ -P, --protocol=[1|2c|3]\n\
     SNMP protocol version\n\
  -L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]\n\
     SNMPv3 securityLevel\n\