diff --git a/0007-bsc#1175328-check-for-correct-fd.patch b/0007-bsc#1175328-check-for-correct-fd.patch new file mode 100644 index 0000000..f50295e --- /dev/null +++ b/0007-bsc#1175328-check-for-correct-fd.patch @@ -0,0 +1,13 @@ +Index: ipmitool-1.8.18+git20200916.1245aaa387dc/lib/helper.c +=================================================================== +--- ipmitool-1.8.18+git20200916.1245aaa387dc.orig/lib/helper.c ++++ ipmitool-1.8.18+git20200916.1245aaa387dc/lib/helper.c +@@ -935,7 +935,7 @@ ipmi_start_daemon(struct ipmi_intf *intf + exit(1); + } + ret = dup(fd); +- if (ret != STDOUT_FILENO) { ++ if (ret != STDERR_FILENO) { + lprintf(LOG_ERR, "failed to reset stderr: %s (%d)", strerror(errno), errno); + exit(1); + } diff --git a/0008-bsc#1181063-dont-parametrize-pidfile-name.patch b/0008-bsc#1181063-dont-parametrize-pidfile-name.patch new file mode 100644 index 0000000..b1ec6e9 --- /dev/null +++ b/0008-bsc#1181063-dont-parametrize-pidfile-name.patch @@ -0,0 +1,39 @@ +Index: ipmitool-1.8.18+git20200916.1245aaa387dc/src/ipmievd.c +=================================================================== +--- ipmitool-1.8.18+git20200916.1245aaa387dc.orig/src/ipmievd.c ++++ ipmitool-1.8.18+git20200916.1245aaa387dc/src/ipmievd.c +@@ -702,8 +702,8 @@ ipmievd_main(struct ipmi_event_intf * ei + struct sigaction act; + mode_t oldumask; + +- memset(pidfile, 0, 64); +- sprintf(pidfile, "%s%d", DEFAULT_PIDFILE, eintf->intf->devnum); ++ memset(pidfile, 0, sizeof(pidfile)); ++ strncpy(pidfile, DEFAULT_PIDFILE, sizeof(pidfile)-1); + + for (i = 0; i < argc; i++) { + if (strcasecmp(argv[i], "help") == 0) { +Index: ipmitool-1.8.18+git20200916.1245aaa387dc/doc/ipmievd.8.in +=================================================================== +--- ipmitool-1.8.18+git20200916.1245aaa387dc.orig/doc/ipmievd.8.in ++++ ipmitool-1.8.18+git20200916.1245aaa387dc/doc/ipmievd.8.in +@@ -174,8 +174,7 @@ Do NOT become a daemon, instead log all + .TP + \fIpidfile\fP=<\fBfilename\fR> + Save process ID to this file when in daemon mode. Defaults to +-/var/run/ipmievd.pid\fIN\fP (where \fIN\fP is the ipmi device +-number -- defaults to 0). ++/var/run/ipmievd.pid. + .RE + + .TP +@@ -197,8 +196,7 @@ Do NOT become a daemon, instead log all + .TP + \fIpidfile\fP=<\fBfilename\fR> + Save process ID to this file when in daemon mode. Defaults to +-/var/run/ipmievd.pid\fIN\fP (where \fIN\fP is the ipmi device +-number -- defaults to 0). ++/var/run/ipmievd.pid. + .TP + \fItimeout\fP=<\fBseconds\fR> + Time between checks for SEL polling method. Default is 10 seconds. diff --git a/ipmitool.changes b/ipmitool.changes index 9d4bfee..ebedfe7 100644 --- a/ipmitool.changes +++ b/ipmitool.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Wed Feb 3 11:08:48 UTC 2021 - Thomas Renninger + +- Fixes (bsc#1179133) lanplus: hanging on getting cipher suites for 10 seconds +A lanplus-don-t-retry-pre-session-Get-cipher-suites.patch + +------------------------------------------------------------------- +Thu Jan 28 13:53:14 UTC 2021 - Josef Möllers + +- Do not append the device number to the PIDFILE pathname + as this will confuse systemd. + [bsc#1181063, 0008-bsc#1181063-dont-parametrize-pidfile-name.patch] + +------------------------------------------------------------------- +Thu Jan 28 09:10:47 UTC 2021 - Josef Möllers + +- When really starting the daemon, in lib/helper.c::ipmi_start_daemon() + stdin/stdout/stderr are redirected to /dev/null and this is checked + but the check for stderr tests for STDOUT_FILENO. This is, most + likely, a copy-paste error. + [bsc#1175328, 0007-bsc#1175328-check-for-correct-fd.patch] + ------------------------------------------------------------------- Wed Sep 23 07:49:45 UTC 2020 - Klaus Kämpf diff --git a/ipmitool.spec b/ipmitool.spec index 2907468..5524cf1 100644 --- a/ipmitool.spec +++ b/ipmitool.spec @@ -33,6 +33,9 @@ Patch3: 0003-Cleanup-and-compiler-issues-only-no-functional-chang.patch Patch4: 0004-Adjust-SUSE-paths.patch Patch5: 0005-HPM-x-compatibility-message-is-DEBUG-only.patch Patch6: 0006-Make-IANA-PEN-download-configurable-fix-uninitalized.patch +Patch7: 0007-bsc#1175328-check-for-correct-fd.patch +Patch8: 0008-bsc#1181063-dont-parametrize-pidfile-name.patch +Patch9: lanplus-don-t-retry-pre-session-Get-cipher-suites.patch BuildRequires: libtool BuildRequires: openssl-devel BuildRequires: readline-devel diff --git a/lanplus-don-t-retry-pre-session-Get-cipher-suites.patch b/lanplus-don-t-retry-pre-session-Get-cipher-suites.patch new file mode 100644 index 0000000..6a87db0 --- /dev/null +++ b/lanplus-don-t-retry-pre-session-Get-cipher-suites.patch @@ -0,0 +1,35 @@ +From: Václav Doležal +Subject: lanplus: don't retry pre-session Get cipher suites +References: bsc#1179133 +Patch-Mainline: +Git-commit: 0de01deddb0aca475b3929c372ca2448d6858a89 +Git-repo: https://github.com/yontalcar/ipmitool.git.git + +Some BMCs are ignoring it, causing needless delay. + +Addresses: https://github.com/ipmitool/ipmitool/issues/199 + +Signed-off-by: Václav Doležal + + +Signed-off-by: +diff --git a/src/plugins/lanplus/lanplus.c b/src/plugins/lanplus/lanplus.c +index f5aba5e..06b29a0 100644 +--- a/src/plugins/lanplus/lanplus.c ++++ b/src/plugins/lanplus/lanplus.c +@@ -3390,9 +3390,13 @@ ipmi_find_best_cipher_suite(struct ipmi_intf *intf) + }; + const size_t nr_preferred = ARRAY_SIZE(cipher_order_preferred); + size_t ipref, i; ++ int rc; ++ int retry_old = intf->ssn_params.retry; + +- if (ipmi_get_channel_cipher_suites(intf, "ipmi", IPMI_LAN_CHANNEL_E, +- suites, &nr_suites) < 0) ++ ipmi_intf_session_set_retry(intf, 1); ++ rc = ipmi_get_channel_cipher_suites(intf, "ipmi", IPMI_LAN_CHANNEL_E, suites, &nr_suites); ++ ipmi_intf_session_set_retry(intf, retry_old); ++ if (rc < 0) + { + /* default legacy behavior - fall back to cipher suite 3 */ + return IPMI_LANPLUS_CIPHER_SUITE_3;