SHA256
1
0
forked from pool/ipmitool
ipmitool/fix_file_permissions.patch

26 lines
545 B
Diff
Raw Normal View History

---
src/ipmievd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/src/ipmievd.c
+++ b/src/ipmievd.c
@@ -700,6 +700,7 @@
int i, rc;
int daemon = 1;
struct sigaction act;
+ mode_t oldumask;
memset(pidfile, 0, 64);
sprintf(pidfile, "%s%d", DEFAULT_PIDFILE, eintf->intf->devnum);
@@ -762,8 +763,9 @@
ipmi_start_daemon(eintf->intf);
- umask(022);
+ oldumask = umask(022);
fp = ipmi_open_file_write(pidfile);
+ umask(oldumask);
if (!fp) {
/* Failed to get fp on PID file -> exit. */
log_halt();