From: Craig Small <csmall@debian.org>
Date: Wed, 24 Apr 2024 17:23:24 +0800
Subject: Make snmpd pidfile word-readable

Bug-Debian: https://bugs.debian.org/528103
Reviewed-by: Craig Small <csmall@debian.org>
Last-Update: 2019-04-30

Almost all pid files are mode 644, including snmptrapd. For some unknown
reason, snmpd had mode 0600.  Now it has 644 like everyone else.
---
 agent/snmpd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/agent/snmpd.c b/agent/snmpd.c
index fe31c87..2d8e14b 100644
--- a/agent/snmpd.c
+++ b/agent/snmpd.c
@@ -946,7 +946,7 @@ main(int argc, char *argv[])
          * already exists.
          */
         unlink(pid_file);
-        fd = open(pid_file, O_CREAT | O_EXCL | O_WRONLY, 0600);
+        fd = open(pid_file, O_CREAT | O_EXCL | O_WRONLY, 0644);
         if (fd == -1) {
             snmp_log_perror(pid_file);
             if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, 
