ipmitool/fix_file_permissions.patch
Thomas Renninger 5f27f49b74 Accepting request 452397 from home:fgerling:branches:systemsmanagement
- Update to latest version: 1.8.18
D	0001-Incorporate-upstream-comments-to-289-add-whitespace.patch

OBS-URL: https://build.opensuse.org/request/show/452397
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ipmitool?expand=0&rev=37
2017-01-25 13:24:35 +00:00

36 lines
1017 B
Diff

Index: ipmitool-1.8.18/lib/helper.c
===================================================================
--- ipmitool-1.8.18.orig/lib/helper.c
+++ ipmitool-1.8.18/lib/helper.c
@@ -829,7 +829,6 @@ ipmi_start_daemon(struct ipmi_intf *intf
#endif
chdir("/");
- umask(0);
for (fd=0; fd<64; fd++) {
if (fd != intf->fd)
Index: ipmitool-1.8.18/src/ipmievd.c
===================================================================
--- ipmitool-1.8.18.orig/src/ipmievd.c
+++ ipmitool-1.8.18/src/ipmievd.c
@@ -701,6 +701,7 @@ ipmievd_main(struct ipmi_event_intf * ei
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);
@@ -763,8 +764,9 @@ ipmievd_main(struct ipmi_event_intf * ei
ipmi_start_daemon(eintf->intf);
- umask(022);
+ oldumask = umask(022);
fp = ipmi_open_file_write(pidfile);
+ umask(oldumask);
if (fp == NULL) {
/* Failed to get fp on PID file -> exit. */
log_halt();