2017-01-25 14:24:35 +01:00
|
|
|
Index: ipmitool-1.8.18/lib/helper.c
|
2014-02-17 16:39:37 +01:00
|
|
|
===================================================================
|
2018-10-01 15:06:42 +02:00
|
|
|
--- ipmitool-1.8.18.orig/lib/helper.c 2018-09-25 11:36:13.675132165 +0200
|
|
|
|
+++ ipmitool-1.8.18/lib/helper.c 2018-09-25 11:40:43.283111633 +0200
|
|
|
|
@@ -867,7 +867,6 @@ ipmi_start_daemon(struct ipmi_intf *intf
|
2010-03-05 16:31:33 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
chdir("/");
|
|
|
|
- umask(0);
|
|
|
|
|
|
|
|
for (fd=0; fd<64; fd++) {
|
|
|
|
if (fd != intf->fd)
|
2017-01-25 14:24:35 +01:00
|
|
|
Index: ipmitool-1.8.18/src/ipmievd.c
|
2014-02-17 16:39:37 +01:00
|
|
|
===================================================================
|
2018-10-01 15:06:42 +02:00
|
|
|
--- ipmitool-1.8.18.orig/src/ipmievd.c 2018-09-25 11:36:13.679132402 +0200
|
|
|
|
+++ ipmitool-1.8.18/src/ipmievd.c 2018-09-25 11:41:12.744857808 +0200
|
2017-01-25 14:24:35 +01:00
|
|
|
@@ -701,6 +701,7 @@ ipmievd_main(struct ipmi_event_intf * ei
|
2010-03-05 16:31:33 +01:00
|
|
|
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);
|
2017-01-25 14:24:35 +01:00
|
|
|
@@ -763,8 +764,9 @@ ipmievd_main(struct ipmi_event_intf * ei
|
2010-03-05 16:31:33 +01:00
|
|
|
|
2013-02-28 14:22:17 +01:00
|
|
|
ipmi_start_daemon(eintf->intf);
|
|
|
|
|
|
|
|
- umask(022);
|
2010-03-05 16:31:33 +01:00
|
|
|
+ oldumask = umask(022);
|
|
|
|
fp = ipmi_open_file_write(pidfile);
|
|
|
|
+ umask(oldumask);
|
2018-10-01 15:06:42 +02:00
|
|
|
if (!fp) {
|
2013-02-28 14:22:17 +01:00
|
|
|
/* Failed to get fp on PID file -> exit. */
|
|
|
|
log_halt();
|