| 1 |
Description: Make snmpd pidfile word-readable |
| 2 |
Almost all pid files are mode 644, including snmptrapd. For some unknown |
| 3 |
reason, snmpd had mode 0600. Now it has 644 like everyone else. |
| 4 |
Author: Craig Small <[email protected]> |
| 5 |
Bug-Debian: https://bugs.debian.org/528103 |
| 6 |
Reviewed-by: Craig Small <[email protected]> |
| 7 |
Last-Update: 2025-12-23 |
| 8 |
--- a/agent/snmpd.c |
| 9 |
+++ b/agent/snmpd.c |
| 10 |
@@ -955,7 +955,7 @@ |
| 11 |
* already exists. |
| 12 |
*/ |
| 13 |
unlink(pid_file); |
| 14 |
- fd = open(pid_file, O_CREAT | O_EXCL | O_WRONLY, 0600); |
| 15 |
+ fd = open(pid_file, O_CREAT | O_EXCL | O_WRONLY, 0644); |
| 16 |
if (fd == -1) { |
| 17 |
snmp_log_perror(pid_file); |
| 18 |
if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, |