2015-01-15 16:15:51 +01:00
|
|
|
Index: ipmitool-1.8.15/lib/helper.c
|
2014-02-17 16:39:37 +01:00
|
|
|
===================================================================
|
2015-01-15 16:15:51 +01:00
|
|
|
--- ipmitool-1.8.15.orig/lib/helper.c 2015-01-14 14:28:25.104693872 +0100
|
|
|
|
+++ ipmitool-1.8.15/lib/helper.c 2015-01-14 14:28:30.392693957 +0100
|
|
|
|
@@ -659,7 +659,6 @@
|
2010-03-05 16:31:33 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
chdir("/");
|
|
|
|
- umask(0);
|
|
|
|
|
|
|
|
for (fd=0; fd<64; fd++) {
|
|
|
|
if (fd != intf->fd)
|
2015-01-15 16:15:51 +01:00
|
|
|
Index: ipmitool-1.8.15/src/ipmievd.c
|
2014-02-17 16:39:37 +01:00
|
|
|
===================================================================
|
2015-01-15 16:15:51 +01:00
|
|
|
--- ipmitool-1.8.15.orig/src/ipmievd.c 2015-01-14 14:28:25.112693873 +0100
|
|
|
|
+++ ipmitool-1.8.15/src/ipmievd.c 2015-01-14 14:28:30.392693957 +0100
|
|
|
|
@@ -701,6 +701,7 @@
|
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);
|
2015-01-15 16:15:51 +01:00
|
|
|
@@ -762,8 +763,9 @@
|
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);
|
2013-02-28 14:22:17 +01:00
|
|
|
if (fp == NULL) {
|
|
|
|
/* Failed to get fp on PID file -> exit. */
|
|
|
|
log_halt();
|