diff -Nru multipath-tools-0.8.8/debian/changelog multipath-tools-0.8.8/debian/changelog --- multipath-tools-0.8.8/debian/changelog 2022-10-28 18:43:41.000000000 +0000 +++ multipath-tools-0.8.8/debian/changelog 2023-09-20 15:05:06.000000000 +0000 @@ -1,3 +1,23 @@ +multipath-tools (0.8.8-1ubuntu1.22.04.3) jammy; urgency=medium + + * debian/multipath-tools.postinst: restart multipathd when upgrading from lt + 0.8.8-1ubuntu1.22.04.3 (LP: #2035098) + + -- Mitchell Dzurick Wed, 20 Sep 2023 08:05:06 -0700 + +multipath-tools (0.8.8-1ubuntu1.22.04.2) jammy; urgency=medium + + [ Sergio Durigan Junior ] + * d/p/0018-libmpathpersist-fix-command-keyword-ordering.patch: + Fix mpathpersist command keyword ordering. (LP: #2026881) + + [ Mitchell Dzurick ] + * Do not install init scripts (LP: #2000186) + - d/multipath-tools.maintscript: remove /etc/init.d/multipath-tools + - d/rules: do not call dh_installinit + + -- Mitchell Dzurick Thu, 13 Jul 2023 11:50:32 -0700 + multipath-tools (0.8.8-1ubuntu1.22.04.1) jammy-security; urgency=medium * SECURITY UPDATE: symlink attack diff -Nru multipath-tools-0.8.8/debian/multipath-tools.maintscript multipath-tools-0.8.8/debian/multipath-tools.maintscript --- multipath-tools-0.8.8/debian/multipath-tools.maintscript 1970-01-01 00:00:00.000000000 +0000 +++ multipath-tools-0.8.8/debian/multipath-tools.maintscript 2023-09-20 15:05:06.000000000 +0000 @@ -0,0 +1 @@ +rm_conffile /etc/init.d/multipath-tools 0.8.8-1ubuntu1.22.04.2~ multipath-tools diff -Nru multipath-tools-0.8.8/debian/multipath-tools.postinst multipath-tools-0.8.8/debian/multipath-tools.postinst --- multipath-tools-0.8.8/debian/multipath-tools.postinst 1970-01-01 00:00:00.000000000 +0000 +++ multipath-tools-0.8.8/debian/multipath-tools.postinst 2023-09-20 15:05:06.000000000 +0000 @@ -0,0 +1,30 @@ +#!/bin/sh +# postinst script for multipath-tools +# +# see: dh_installdeb(1) + +set -e + +FIXED=0.8.8-1ubuntu1.22.04.3 +# The previous multipath-tools.prerm maintainer script did not stop the +# multipathd.service unit, therefore it needs to be stopped here for this +# specific upgrade case. +# "systemctl daemon-reload" is specifically not being called before +# deb-systemd-invoke because: +# a) it will be called later in the script, before multipathd.service is +# started, so let's not call it twice +# b) it has system-wide effects, like running all systemd generators again +# c) we don't really need the new multipathd.service unit file to stop the old +# running daemon. In fact, one could argue it's more correct to use the old +# unit file to stop the old daemon. +# This approach will generate a one-time warning that can be ignored. +if dpkg --compare-versions "$2" lt-nl "$FIXED"; then + echo -n "The warning about having to reload systemd units can be safely" >&2 + echo " ignored. Please see LP: #2035098 for details." >&2 + + deb-systemd-invoke stop 'multipathd.service' >/dev/null || true +fi + +#DEBHELPER# + +exit 0 diff -Nru multipath-tools-0.8.8/debian/patches/0018-libmpathpersist-fix-command-keyword-ordering.patch multipath-tools-0.8.8/debian/patches/0018-libmpathpersist-fix-command-keyword-ordering.patch --- multipath-tools-0.8.8/debian/patches/0018-libmpathpersist-fix-command-keyword-ordering.patch 1970-01-01 00:00:00.000000000 +0000 +++ multipath-tools-0.8.8/debian/patches/0018-libmpathpersist-fix-command-keyword-ordering.patch 2023-09-20 15:05:06.000000000 +0000 @@ -0,0 +1,73 @@ +From: Benjamin Marzinski +Date: Tue, 29 Nov 2022 22:56:48 -0600 +Subject: libmpathpersist: fix command keyword ordering + +When libmpathpersist was communicating with multipathd, it wasn't using +the correct keyword order for the commands, as specified in the CLI +commands reference. Since commit f812466f, multipathd requires commands +to be ordered correctly. Fix the ordering. + +Fixes: f812466f ("multipathd: more robust command parsing") +Reported-by: miaoguanqin +Cc: lixiaokeng +Signed-off-by: Benjamin Marzinski +Reviewed-by: Martin Wilck + +Origin: upstream, https://github.com/opensvc/multipath-tools/commit/04912e2fea94da2e7ccedabab5725b07ade2bcd4 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/2026881 +Applied-Upstream: 0.9.4 +--- + libmpathpersist/mpath_updatepr.c | 23 ++++++++++++----------- + 1 file changed, 12 insertions(+), 11 deletions(-) + +diff --git a/libmpathpersist/mpath_updatepr.c b/libmpathpersist/mpath_updatepr.c +index bdecaa0..a81b7c6 100644 +--- a/libmpathpersist/mpath_updatepr.c ++++ b/libmpathpersist/mpath_updatepr.c +@@ -17,7 +17,7 @@ + #include "mpathpr.h" + + +-static int do_update_pr(char *alias, char *arg) ++static int do_update_pr(char *alias, char *cmd, char *key) + { + int fd; + char str[256]; +@@ -30,7 +30,10 @@ static int do_update_pr(char *alias, char *arg) + return -1; + } + +- snprintf(str,sizeof(str),"map %s %s", alias, arg); ++ if (key) ++ snprintf(str,sizeof(str),"%s map %s key %s", cmd, alias, key); ++ else ++ snprintf(str,sizeof(str),"%s map %s", cmd, alias); + condlog (2, "%s: pr message=%s", alias, str); + if (send_packet(fd, str) != 0) { + condlog(2, "%s: message=%s send error=%d", alias, str, errno); +@@ -55,18 +58,16 @@ static int do_update_pr(char *alias, char *arg) + } + + int update_prflag(char *mapname, int set) { +- return do_update_pr(mapname, (set)? "setprstatus" : "unsetprstatus"); ++ return do_update_pr(mapname, (set)? "setprstatus" : "unsetprstatus", ++ NULL); + } + + int update_prkey_flags(char *mapname, uint64_t prkey, uint8_t sa_flags) { + char str[256]; +- char *flagstr = ""; + +- if (sa_flags & MPATH_F_APTPL_MASK) +- flagstr = ":aptpl"; +- if (prkey) +- sprintf(str, "setprkey key %" PRIx64 "%s", prkey, flagstr); +- else +- sprintf(str, "unsetprkey"); +- return do_update_pr(mapname, str); ++ if (!prkey) ++ return do_update_pr(mapname, "unsetprkey", NULL); ++ sprintf(str, "%" PRIx64 "%s", prkey, ++ (sa_flags & MPATH_F_APTPL_MASK) ? ":aptpl" : ""); ++ return do_update_pr(mapname, "setprkey", str); + } diff -Nru multipath-tools-0.8.8/debian/patches/series multipath-tools-0.8.8/debian/patches/series --- multipath-tools-0.8.8/debian/patches/series 2022-10-28 18:43:41.000000000 +0000 +++ multipath-tools-0.8.8/debian/patches/series 2023-09-20 15:05:06.000000000 +0000 @@ -15,3 +15,4 @@ CVE-2022-41974-2.patch CVE-2022-41974-3.patch CVE-2022-41974-4.patch +0018-libmpathpersist-fix-command-keyword-ordering.patch diff -Nru multipath-tools-0.8.8/debian/rules multipath-tools-0.8.8/debian/rules --- multipath-tools-0.8.8/debian/rules 2022-10-28 18:43:41.000000000 +0000 +++ multipath-tools-0.8.8/debian/rules 2023-09-20 15:05:06.000000000 +0000 @@ -110,8 +110,6 @@ dh_installchangelogs -i dh_installdocs -i dh_installexamples -i - dh_installinit -pmultipath-tools-boot --name=multipath-tools-boot --no-start -- start 21 S . - dh_installinit -pmultipath-tools-boot dh_installdebconf -pmultipath-tools-boot dh_installman -i dh_compress -i @@ -130,7 +128,6 @@ dh_installexamples -a dh_lintian -a dh_systemd_enable -pmultipath-tools multipathd.service - dh_installinit -pmultipath-tools dh_installudev -pkpartx --priority=95 dh_installudev -pkpartx --name=dm-parts --priority=56 dh_installudev -pkpartx --name=del-part-nodes --priority=68