Hi folks,

I have discovered following issue.

When I run in terminal:
# snmpd -h

I get proper usage information, but snmpd process still exists.
I prepared simple patch with solution based on code from 5.7 version of 
net-snmp (in attachment).

Regards

Josef Ridky
Associate Software Engineer
Core Services Team
Red Hat Czech, s.r.o.

From ee487531b8e6efaff661cbc197c4b7cadac6ea03 Mon Sep 17 00:00:00 2001
From: Josef Ridky <jri...@redhat.com>
Date: Thu, 4 Oct 2018 10:22:57 +0200
Subject: [PATCH] Exit snmpd after calling snmpd -h

---
 agent/snmpd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/agent/snmpd.c b/agent/snmpd.c
index a0f2d6552..e2169a793 100644
--- a/agent/snmpd.c
+++ b/agent/snmpd.c
@@ -289,6 +289,7 @@ usage(char *prog)
            "  -S d|i|0-7\t\tuse -Ls <facility> instead\n"
            "\n"
            );
+           exit(1);
 }
 
 static void
-- 
2.14.4

_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to