summaryrefslogtreecommitdiffstats
path: root/web/attachments/123952-check_snmp.c.diff
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/123952-check_snmp.c.diff')
-rw-r--r--web/attachments/123952-check_snmp.c.diff23
1 files changed, 23 insertions, 0 deletions
diff --git a/web/attachments/123952-check_snmp.c.diff b/web/attachments/123952-check_snmp.c.diff
new file mode 100644
index 0000000..9d726bd
--- /dev/null
+++ b/web/attachments/123952-check_snmp.c.diff
@@ -0,0 +1,23 @@
1diff -ruN nagios-plugins-1.4.orig/plugins/check_snmp.c nagios-plugins-1.4/plugins/check_snmp.c
2--- nagios-plugins-1.4.orig/plugins/check_snmp.c 2005-01-21 04:03:56.000000000 +0300
3+++ nagios-plugins-1.4/plugins/check_snmp.c 2005-03-03 14:18:55.000000000 +0300
4@@ -646,6 +646,10 @@
5 asprintf(&proto, DEFAULT_PROTOCOL);
6 asprintf(&authpriv, "%s%s", "-c ", community);
7 }
8+ else if ( strcmp (proto, "2c") == 0 ) { /* snmpv2c args */
9+ asprintf(&proto, "%s", "2c");
10+ asprintf(&authpriv, "%s%s", "-c ", community);
11+ }
12 else if ( strcmp (proto, "3") == 0 ) { /* snmpv3 args */
13 asprintf(&proto, "%s", "3");
14
15@@ -859,7 +863,7 @@
16
17 /* SNMP and Authentication Protocol */
18 printf (_("\
19- -P, --protocol=[1|3]\n\
20+ -P, --protocol=[1|2c|3]\n\
21 SNMP protocol version\n\
22 -L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]\n\
23 SNMPv3 securityLevel\n\