SHA256
1
0
forked from pool/ipmitool
ipmitool/fix_file_permissions.patch
Thomas Renninger 2b18cffcc3 Accepting request 639393 from home:trenn:branches:systemsmanagement
- Update to latest git HEAD revision of 1.8.18 version
    commit 6f336d04f14b420822902dca7ef595cd49847d21
    Date:   Mon Sep 24 15:41:00 2018 +0200
- Change git repo and URL in spec from sourceforge to github
- Add download of iana pen list via _service
  from www.iana.org which is used to
  create a C include file at build time (lib/ipmi_pen_list.inc.c)
Downloaded file added:
A enterprise-numbers
- Add possiblity to create the include file from an already
  downloaded, local file
A create_pen_list_from_local_file.patch

OBS-URL: https://build.opensuse.org/request/show/639393
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ipmitool?expand=0&rev=49
2018-10-01 13:06:42 +00:00

36 lines
1.1 KiB
Diff

Index: ipmitool-1.8.18/lib/helper.c
===================================================================
--- 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
#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 2018-09-25 11:36:13.679132402 +0200
+++ ipmitool-1.8.18/src/ipmievd.c 2018-09-25 11:41:12.744857808 +0200
@@ -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) {
/* Failed to get fp on PID file -> exit. */
log_halt();