SHA256
1
0
forked from pool/ipmitool
ipmitool/0002-Fix-file-permissions.patch
Klaus Kämpf 42f6b48b25 - clean up patches
rename fwum_enhance_output.patch
   to 0001-Enhance-fwum-output.patch
  rename fix_file_permissions.patch
   to 0002-Fix-file-permissions.patch
  rename several_more_compile_fixes.patch
   to 0003-Cleanup-and-compiler-issues-only-no-functional-chang.patch
  rename ipmitool_adjust_suse_paths.patch
   to 0004-Adjust-SUSE-paths.patch
  rename hpm_x_compatibility_msg_is_debug_only.patch
   to 0005-HPM-x-compatibility-message-is-DEBUG-only.patch
  rename autotools_define_DOWNLOAD.diff
   to 0006-Make-IANA-PEN-download-configurable-fix-uninitalized.patch

- Update to version 1.8.18+git20200916.1245aaa387dc:
  * fru: Fix crashes on 6-bit ASCII strings
  * Refix 6e037d6bfbbb93b349c8ca331ebde03a837f76bf
  * oem: Add product ID for YADRO VEGMAN
  * configure.ac: add '--location' for curl to follow location
  * configure.ac: replace '-#' by '--progress-bar' with curl
  * log: refix 16f937a1: Add missing header changes
  * Add version info to debug output
  * doc, ci: Fix an error in package name for Windows
  * doc: Fix a small typo in INSTALL
  * RPM support: updated spec file changelog

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ipmitool?expand=0&rev=53
2020-09-23 07:51:43 +00:00

36 lines
982 B
Diff

From b7f319ded60e89470012c6f9f957a0bcf9ab7d98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
Date: Wed, 23 Sep 2020 09:35:54 +0200
Subject: [PATCH 2/6] Fix file permissions
---
src/ipmievd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/ipmievd.c b/src/ipmievd.c
index eeaa0c9c3b98..df01cc8bdf0b 100644
--- a/src/ipmievd.c
+++ b/src/ipmievd.c
@@ -700,6 +700,7 @@ ipmievd_main(struct ipmi_event_intf * eintf, int argc, char ** argv)
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 @@ ipmievd_main(struct ipmi_event_intf * eintf, int argc, char ** argv)
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();
--
2.26.0