File: snmpd_pidfile_mode

package info (click to toggle)
net-snmp 5.9.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 38,720 kB
  • sloc: ansic: 282,878; perl: 17,704; sh: 12,151; makefile: 2,711; python: 734; xml: 663; pascal: 62; sql: 47
file content (18 lines) | stat: -rw-r--r-- 730 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Make snmpd pidfile word-readable
 Almost all pid files are mode 644, including snmptrapd. For some unknown
 reason, snmpd had mode 0600.  Now it has 644 like everyone else.
Author: Craig Small <csmall@debian.org>
Bug-Debian: https://bugs.debian.org/528103
Reviewed-by: Craig Small <csmall@debian.org>
Last-Update: 2019-04-30
--- a/agent/snmpd.c
+++ b/agent/snmpd.c
@@ -946,7 +946,7 @@
          * 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,