diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-03-27 22:40:05 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-03-27 22:40:05 +0100 |
commit | 8c364c784966be1700ea39ae45028f3e9be9cae0 (patch) | |
tree | c1971211069b79e3831b71accd52a67a9fdc77a3 /sys-apps/systemd/files | |
parent | 6bd95d1f6320b8666a31ec949183aaa3088aa16f (diff) |
gentoo resync : 27.03.2018
Diffstat (limited to 'sys-apps/systemd/files')
-rw-r--r-- | sys-apps/systemd/files/238-0003-udev-net-id-Fix-check-for-address-to-keep-interface-8458.patch | 37 | ||||
-rw-r--r-- | sys-apps/systemd/files/238-libmount-include.patch | 72 |
2 files changed, 109 insertions, 0 deletions
diff --git a/sys-apps/systemd/files/238-0003-udev-net-id-Fix-check-for-address-to-keep-interface-8458.patch b/sys-apps/systemd/files/238-0003-udev-net-id-Fix-check-for-address-to-keep-interface-8458.patch new file mode 100644 index 000000000000..693d67152ea9 --- /dev/null +++ b/sys-apps/systemd/files/238-0003-udev-net-id-Fix-check-for-address-to-keep-interface-8458.patch @@ -0,0 +1,37 @@ +From 8eebb6a9e5e74ec0ef40902e2da53d24559b94a4 Mon Sep 17 00:00:00 2001 +From: Filipe Brandenburger <filbranden@google.com> +Date: Thu, 15 Mar 2018 10:42:38 -0700 +Subject: [PATCH] udev/net-id: Fix check for address to keep interface names + stable (#8458) + +This was a bug inadvertently added by commit 73fc96c8ac0aa9. + +The intent of the check is to "match slot address with device by +stripping the function" (as the comment above states it), for example +match network device PCI address 0000:05:00.0 (including a .0 for +function) to PCI slot address 0000:05:00, but changing that to a streq() +call prevented the match. + +Change that to startswith(), which should both fix the bug and make the +intent of the check more clear and prevent unintentional bugs from being +introduced by future refactorings. +--- + src/udev/udev-builtin-net_id.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c +index 36994360c7..6efa712930 100644 +--- a/src/udev/udev-builtin-net_id.c ++++ b/src/udev/udev-builtin-net_id.c +@@ -297,7 +297,7 @@ static int dev_pci_slot(struct udev_device *dev, struct netnames *names) { + if (snprintf_ok(str, sizeof str, "%s/%s/address", slots, dent->d_name) && + read_one_line_file(str, &address) >= 0) + /* match slot address with device by stripping the function */ +- if (streq(address, udev_device_get_sysname(names->pcidev))) ++ if (startswith(udev_device_get_sysname(names->pcidev), address)) + hotplug_slot = i; + + if (hotplug_slot > 0) +-- +2.16.2 + diff --git a/sys-apps/systemd/files/238-libmount-include.patch b/sys-apps/systemd/files/238-libmount-include.patch new file mode 100644 index 000000000000..6a02dff65e40 --- /dev/null +++ b/sys-apps/systemd/files/238-libmount-include.patch @@ -0,0 +1,72 @@ +From 227b8a762fea1458547be2cdf0e6e4aac0079730 Mon Sep 17 00:00:00 2001 +From: Michael Olbrich <m.olbrich@pengutronix.de> +Date: Mon, 26 Mar 2018 17:34:53 +0200 +Subject: [PATCH] core: don't include libmount.h in a header file (#8580) + +linux/fs.h sys/mount.h, libmount.h and missing.h all include MS_* +definitions. + +To avoid problems, only one of linux/fs.h, sys/mount.h and libmount.h +should be included. And missing.h must be included last. + +Without this, building systemd may fail with: + +In file included from [...]/libmount/libmount.h:31:0, + from ../systemd-238/src/core/manager.h:23, + from ../systemd-238/src/core/emergency-action.h:37, + from ../systemd-238/src/core/unit.h:34, + from ../systemd-238/src/core/dbus-timer.h:25, + from ../systemd-238/src/core/timer.c:26: +[...]/sys/mount.h:57:2: error: expected identifier before numeric constant +--- + src/core/dbus-execute.c | 1 + + src/core/manager.h | 3 ++- + src/core/mount.c | 2 ++ + 3 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c +index 7344623ebf6..c342093bca4 100644 +--- a/src/core/dbus-execute.c ++++ b/src/core/dbus-execute.c +@@ -18,6 +18,7 @@ + along with systemd; If not, see <http://www.gnu.org/licenses/>. + ***/ + ++#include <sys/mount.h> + #include <sys/prctl.h> + #include <stdio_ext.h> + +diff --git a/src/core/manager.h b/src/core/manager.h +index 28c5da225b1..e09e0cdf5e9 100644 +--- a/src/core/manager.h ++++ b/src/core/manager.h +@@ -20,7 +20,6 @@ + along with systemd; If not, see <http://www.gnu.org/licenses/>. + ***/ + +-#include <libmount.h> + #include <stdbool.h> + #include <stdio.h> + +@@ -34,6 +33,8 @@ + #include "list.h" + #include "ratelimit.h" + ++struct libmnt_monitor; ++ + /* Enforce upper limit how many names we allow */ + #define MANAGER_MAX_NAMES 131072 /* 128K */ + +diff --git a/src/core/mount.c b/src/core/mount.c +index 0e755da5c02..0154ebda5d6 100644 +--- a/src/core/mount.c ++++ b/src/core/mount.c +@@ -23,6 +23,8 @@ + #include <stdio.h> + #include <sys/epoll.h> + ++#include <libmount.h> ++ + #include "sd-messages.h" + + #include "alloc-util.h" |