diff options
Diffstat (limited to 'meta/recipes-core/systemd')
32 files changed, 187 insertions, 893 deletions
diff --git a/meta/recipes-core/systemd/systemd-boot_250.5.bb b/meta/recipes-core/systemd/systemd-boot_250.14.bb index b67706b731..b67706b731 100644 --- a/meta/recipes-core/systemd/systemd-boot_250.5.bb +++ b/meta/recipes-core/systemd/systemd-boot_250.14.bb | |||
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc index 309105290f..86ae4793c3 100644 --- a/meta/recipes-core/systemd/systemd.inc +++ b/meta/recipes-core/systemd/systemd.inc | |||
| @@ -14,7 +14,7 @@ LICENSE = "GPL-2.0-only & LGPL-2.1-only" | |||
| 14 | LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ | 14 | LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ |
| 15 | file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" | 15 | file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" |
| 16 | 16 | ||
| 17 | SRCREV = "4a31fa2fb040005b73253da75cf84949b8485175" | 17 | SRCREV = "4ada1290584745ab6643eece9e1756a8c0e079ca" |
| 18 | SRCBRANCH = "v250-stable" | 18 | SRCBRANCH = "v250-stable" |
| 19 | SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}" | 19 | SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}" |
| 20 | 20 | ||
diff --git a/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch b/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch index c42c66786f..c3cc3ea790 100644 --- a/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch +++ b/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 9a1841402ce3ef21a10a7314a07a615f8196d406 Mon Sep 17 00:00:00 2001 | 1 | From 10ec14bf4a75891a99defa37f5e9452ac6fe12b3 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 21 Jan 2022 22:19:37 -0800 | 3 | Date: Fri, 21 Jan 2022 22:19:37 -0800 |
| 4 | Subject: [PATCH] Adjust for musl headers | 4 | Subject: [PATCH] Adjust for musl headers |
| @@ -174,7 +174,7 @@ index d15766cd7b..60728b4f94 100644 | |||
| 174 | #include "conf-parser.h" | 174 | #include "conf-parser.h" |
| 175 | #include "ipvlan.h" | 175 | #include "ipvlan.h" |
| 176 | diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c | 176 | diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c |
| 177 | index f1a566a9ca..1f37927a83 100644 | 177 | index df0d924443..6400032f96 100644 |
| 178 | --- a/src/network/netdev/macsec.c | 178 | --- a/src/network/netdev/macsec.c |
| 179 | +++ b/src/network/netdev/macsec.c | 179 | +++ b/src/network/netdev/macsec.c |
| 180 | @@ -1,7 +1,7 @@ | 180 | @@ -1,7 +1,7 @@ |
| @@ -200,7 +200,7 @@ index c41be6e78f..ee2660c5bf 100644 | |||
| 200 | #include "conf-parser.h" | 200 | #include "conf-parser.h" |
| 201 | #include "macvlan.h" | 201 | #include "macvlan.h" |
| 202 | diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c | 202 | diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c |
| 203 | index 8e7fe11c18..701ab2bd69 100644 | 203 | index b46b9ecc90..e6e58c5f0f 100644 |
| 204 | --- a/src/network/netdev/netdev.c | 204 | --- a/src/network/netdev/netdev.c |
| 205 | +++ b/src/network/netdev/netdev.c | 205 | +++ b/src/network/netdev/netdev.c |
| 206 | @@ -2,7 +2,7 @@ | 206 | @@ -2,7 +2,7 @@ |
| @@ -275,7 +275,7 @@ index c946e81fc0..d1a6be73f9 100644 | |||
| 275 | 275 | ||
| 276 | #include "netlink-util.h" | 276 | #include "netlink-util.h" |
| 277 | diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c | 277 | diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c |
| 278 | index af3e77963e..efa4b0a164 100644 | 278 | index 58c2da32dd..f4a5fd7343 100644 |
| 279 | --- a/src/network/netdev/vlan.c | 279 | --- a/src/network/netdev/vlan.c |
| 280 | +++ b/src/network/netdev/vlan.c | 280 | +++ b/src/network/netdev/vlan.c |
| 281 | @@ -2,7 +2,7 @@ | 281 | @@ -2,7 +2,7 @@ |
| @@ -327,7 +327,7 @@ index 30b0855598..a065158801 100644 | |||
| 327 | #include "conf-parser.h" | 327 | #include "conf-parser.h" |
| 328 | #include "alloc-util.h" | 328 | #include "alloc-util.h" |
| 329 | diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c | 329 | diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c |
| 330 | index 88f668753a..5fc753384b 100644 | 330 | index 6c251b3a2e..000e3d01a9 100644 |
| 331 | --- a/src/network/netdev/wireguard.c | 331 | --- a/src/network/netdev/wireguard.c |
| 332 | +++ b/src/network/netdev/wireguard.c | 332 | +++ b/src/network/netdev/wireguard.c |
| 333 | @@ -6,7 +6,7 @@ | 333 | @@ -6,7 +6,7 @@ |
| @@ -373,7 +373,7 @@ index 10025a97ae..a0239ea83a 100644 | |||
| 373 | #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U | 373 | #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U |
| 374 | 374 | ||
| 375 | diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c | 375 | diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c |
| 376 | index 7996960bd1..e870b9ba26 100644 | 376 | index 4f13eada05..7e3ea2108b 100644 |
| 377 | --- a/src/network/networkd-dhcp-common.c | 377 | --- a/src/network/networkd-dhcp-common.c |
| 378 | +++ b/src/network/networkd-dhcp-common.c | 378 | +++ b/src/network/networkd-dhcp-common.c |
| 379 | @@ -1,7 +1,8 @@ | 379 | @@ -1,7 +1,8 @@ |
| @@ -421,7 +421,7 @@ index 9acfd17d49..3108289602 100644 | |||
| 421 | 421 | ||
| 422 | #include "sd-dhcp-server.h" | 422 | #include "sd-dhcp-server.h" |
| 423 | diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c | 423 | diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c |
| 424 | index cb9c428ae9..a35d58f3f1 100644 | 424 | index f97e8033b8..21026ac0bf 100644 |
| 425 | --- a/src/network/networkd-dhcp4.c | 425 | --- a/src/network/networkd-dhcp4.c |
| 426 | +++ b/src/network/networkd-dhcp4.c | 426 | +++ b/src/network/networkd-dhcp4.c |
| 427 | @@ -3,7 +3,7 @@ | 427 | @@ -3,7 +3,7 @@ |
| @@ -434,7 +434,7 @@ index cb9c428ae9..a35d58f3f1 100644 | |||
| 434 | #include "alloc-util.h" | 434 | #include "alloc-util.h" |
| 435 | #include "dhcp-client-internal.h" | 435 | #include "dhcp-client-internal.h" |
| 436 | diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c | 436 | diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c |
| 437 | index b62a154828..75949e6094 100644 | 437 | index 090da53a1e..8b402a5b04 100644 |
| 438 | --- a/src/network/networkd-link.c | 438 | --- a/src/network/networkd-link.c |
| 439 | +++ b/src/network/networkd-link.c | 439 | +++ b/src/network/networkd-link.c |
| 440 | @@ -3,7 +3,7 @@ | 440 | @@ -3,7 +3,7 @@ |
| @@ -447,7 +447,7 @@ index b62a154828..75949e6094 100644 | |||
| 447 | #include <linux/netdevice.h> | 447 | #include <linux/netdevice.h> |
| 448 | #include <sys/socket.h> | 448 | #include <sys/socket.h> |
| 449 | diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c | 449 | diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c |
| 450 | index ee7a535075..ce6ed64133 100644 | 450 | index f3b6f38967..5793fd93f8 100644 |
| 451 | --- a/src/network/networkd-route.c | 451 | --- a/src/network/networkd-route.c |
| 452 | +++ b/src/network/networkd-route.c | 452 | +++ b/src/network/networkd-route.c |
| 453 | @@ -1,9 +1,5 @@ | 453 | @@ -1,9 +1,5 @@ |
| @@ -472,7 +472,7 @@ index ee7a535075..ce6ed64133 100644 | |||
| 472 | _cleanup_(route_freep) Route *route = NULL; | 472 | _cleanup_(route_freep) Route *route = NULL; |
| 473 | 473 | ||
| 474 | diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c | 474 | diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c |
| 475 | index e00cc1e589..e392c7e1a2 100644 | 475 | index 1ab58a5bd2..72860cc542 100644 |
| 476 | --- a/src/network/networkd-setlink.c | 476 | --- a/src/network/networkd-setlink.c |
| 477 | +++ b/src/network/networkd-setlink.c | 477 | +++ b/src/network/networkd-setlink.c |
| 478 | @@ -2,7 +2,7 @@ | 478 | @@ -2,7 +2,7 @@ |
diff --git a/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch b/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch index 31efc4cc4b..9303f42daf 100644 --- a/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch +++ b/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From beb0219b71510bc63aed81d2a970a04349d6c616 Mon Sep 17 00:00:00 2001 | 1 | From e06212833237dd639a843b5f9733f8a49f3a9119 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 29 Sep 2020 18:01:41 -0700 | 3 | Date: Tue, 29 Sep 2020 18:01:41 -0700 |
| 4 | Subject: [PATCH] Move sysusers.d/sysctl.d/binfmt.d/modules-load.d to /usr | 4 | Subject: [PATCH] Move sysusers.d/sysctl.d/binfmt.d/modules-load.d to /usr |
| @@ -7,21 +7,26 @@ These directories are moved to /lib since systemd v246, commit | |||
| 7 | 4a56315a990b ("path: use ROOTPREFIX properly"), but in oe-core/yocto, | 7 | 4a56315a990b ("path: use ROOTPREFIX properly"), but in oe-core/yocto, |
| 8 | the old /usr/lib is still being used. | 8 | the old /usr/lib is still being used. |
| 9 | 9 | ||
| 10 | Modified to resolve the merge conflict introduced by systemd v250.14 | ||
| 11 | version. | ||
| 12 | |||
| 10 | Upstream-Status: Inappropriate (OE-specific) | 13 | Upstream-Status: Inappropriate (OE-specific) |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> | 15 | Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> |
| 16 | Signed-off-by: Narpat Mali <narpat.falna@gmail.com> | ||
| 17 | |||
| 13 | --- | 18 | --- |
| 14 | src/core/systemd.pc.in | 8 ++++---- | 19 | src/core/systemd.pc.in | 8 ++++---- |
| 15 | src/libsystemd/sd-path/sd-path.c | 8 ++++---- | 20 | src/libsystemd/sd-path/sd-path.c | 8 ++++---- |
| 16 | 2 files changed, 8 insertions(+), 8 deletions(-) | 21 | 2 files changed, 8 insertions(+), 8 deletions(-) |
| 17 | 22 | ||
| 18 | diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in | 23 | diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in |
| 19 | index fc0f8c34fa..65996bbed8 100644 | 24 | index 693433b34b..8368a3ff02 100644 |
| 20 | --- a/src/core/systemd.pc.in | 25 | --- a/src/core/systemd.pc.in |
| 21 | +++ b/src/core/systemd.pc.in | 26 | +++ b/src/core/systemd.pc.in |
| 22 | @@ -65,16 +65,16 @@ systemdshutdowndir=${systemd_shutdown_dir} | 27 | @@ -67,16 +67,16 @@ tmpfilesdir=${tmpfiles_dir} |
| 23 | tmpfiles_dir=${prefix}/lib/tmpfiles.d | 28 | |
| 24 | tmpfilesdir=${tmpfiles_dir} | 29 | user_tmpfiles_dir=${prefix}/share/user-tmpfiles.d |
| 25 | 30 | ||
| 26 | -sysusers_dir=${rootprefix}/lib/sysusers.d | 31 | -sysusers_dir=${rootprefix}/lib/sysusers.d |
| 27 | +sysusers_dir=${prefix}/lib/sysusers.d | 32 | +sysusers_dir=${prefix}/lib/sysusers.d |
| @@ -68,6 +73,3 @@ index ff1e0d5f8e..19a001f47e 100644 | |||
| 68 | return 0; | 73 | return 0; |
| 69 | 74 | ||
| 70 | case SD_PATH_CATALOG: | 75 | case SD_PATH_CATALOG: |
| 71 | -- | ||
| 72 | 2.34.1 | ||
| 73 | |||
diff --git a/meta/recipes-core/systemd/systemd/0001-core-fix-build-when-seccomp-is-off.patch b/meta/recipes-core/systemd/systemd/0001-core-fix-build-when-seccomp-is-off.patch new file mode 100644 index 0000000000..63100ce6da --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-core-fix-build-when-seccomp-is-off.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From 10c567204edcd2926ce4f762d7015d5894756d52 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jonas Gorski <jonas.gorski@bisdn.de> | ||
| 3 | Date: Thu, 12 Sep 2024 15:46:29 +0200 | ||
| 4 | Subject: [PATCH] core: fix build when seccomp is off | ||
| 5 | |||
| 6 | Something went wrong when 6aa2c55522d7cac62ecfd5d5687a86a84f158d18 was | ||
| 7 | cherry-picked for v250-stable, causing it to fail to build when seccomp | ||
| 8 | is disabled. | ||
| 9 | |||
| 10 | Fix this by changing the code to how it looks like in other versions of | ||
| 11 | the backported commit, slightly adapted to the file's style in v250. | ||
| 12 | |||
| 13 | Fixes the following build error: | ||
| 14 | |||
| 15 | | ../git/src/core/main.c: In function 'parse_config_file': | ||
| 16 | | ../git/src/core/main.c:721:101: error: lvalue required as unary '&' operand | ||
| 17 | | 721 | { "Manager", "SystemCallArchitectures", config_parse_syscall_archs, 0, &DISABLED_CONFIGURATION }, | ||
| 18 | | | ^ | ||
| 19 | |||
| 20 | Fixes: 8e8c7d51140b ("pid1: generate compat warning for SystemCallArchitectures= if seccomp is off") | ||
| 21 | |||
| 22 | Upstream-Status: Backport [https://github.com/systemd/systemd-stable/commit/b19b7c67e9cb74c44c43a0daf6172f9d32f134ec] | ||
| 23 | Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de> | ||
| 24 | Signed-off-by: Narpat Mali <narpat.falna@gmail.com> | ||
| 25 | --- | ||
| 26 | src/core/main.c | 2 +- | ||
| 27 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 28 | |||
| 29 | diff --git a/src/core/main.c b/src/core/main.c | ||
| 30 | index 19686fa475..5914be6a83 100644 | ||
| 31 | --- a/src/core/main.c | ||
| 32 | +++ b/src/core/main.c | ||
| 33 | @@ -718,7 +718,7 @@ static int parse_config_file(void) { | ||
| 34 | #if HAVE_SECCOMP | ||
| 35 | { "Manager", "SystemCallArchitectures", config_parse_syscall_archs, 0, &arg_syscall_archs }, | ||
| 36 | #else | ||
| 37 | - { "Manager", "SystemCallArchitectures", config_parse_syscall_archs, 0, &DISABLED_CONFIGURATION }, | ||
| 38 | + { "Manager", "SystemCallArchitectures", config_parse_warn_compat, DISABLED_CONFIGURATION, NULL }, | ||
| 39 | #endif | ||
| 40 | { "Manager", "TimerSlackNSec", config_parse_nsec, 0, &arg_timer_slack_nsec }, | ||
| 41 | { "Manager", "DefaultTimerAccuracySec", config_parse_sec, 0, &arg_default_timer_accuracy_usec }, | ||
diff --git a/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch b/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch index 9ebff9825a..b64d6b30a7 100644 --- a/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch +++ b/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From dab02796780f00d689cc1c7a0ba81abe7c5f28d0 Mon Sep 17 00:00:00 2001 | 1 | From 2252b9a6c598f8ed4efe95d2a149f68db7fb9cc4 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 21 Jan 2022 15:15:11 -0800 | 3 | Date: Fri, 21 Jan 2022 15:15:11 -0800 |
| 4 | Subject: [PATCH] pass correct parameters to getdents64 | 4 | Subject: [PATCH] pass correct parameters to getdents64 |
| @@ -12,14 +12,33 @@ Fixes | |||
| 12 | n = getdents64(fd, &buffer, sizeof(buffer)); | 12 | n = getdents64(fd, &buffer, sizeof(buffer)); |
| 13 | ^~~~~~~ | 13 | ^~~~~~~ |
| 14 | 14 | ||
| 15 | Modified to resolve the merge conflict introduced by systemd v250.14 version. | ||
| 16 | |||
| 15 | Upstream-Status: Inappropriate [musl specific] | 17 | Upstream-Status: Inappropriate [musl specific] |
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 17 | Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> | 19 | Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> |
| 20 | Signed-off-by: Narpat Mali <narpat.falna@gmail.com> | ||
| 21 | |||
| 18 | --- | 22 | --- |
| 23 | src/basic/dirent-util.h | 6 ++++++ | ||
| 19 | src/basic/recurse-dir.c | 2 +- | 24 | src/basic/recurse-dir.c | 2 +- |
| 20 | src/basic/stat-util.c | 2 +- | 25 | src/basic/stat-util.c | 8 ++++++-- |
| 21 | 2 files changed, 2 insertions(+), 2 deletions(-) | 26 | 3 files changed, 13 insertions(+), 3 deletions(-) |
| 22 | 27 | ||
| 28 | diff --git a/src/basic/dirent-util.h b/src/basic/dirent-util.h | ||
| 29 | index 04bc53003f..5fde9043a3 100644 | ||
| 30 | --- a/src/basic/dirent-util.h | ||
| 31 | +++ b/src/basic/dirent-util.h | ||
| 32 | @@ -51,3 +51,9 @@ assert_cc(sizeof_field(struct dirent, d_name) == sizeof_field(struct dirent64, d | ||
| 33 | for (void *_end = (uint8_t*) ({ (de) = (buf); }) + (sz); \ | ||
| 34 | (uint8_t*) (de) < (uint8_t*) _end; \ | ||
| 35 | (de) = (struct dirent*) ((uint8_t*) (de) + (de)->d_reclen)) | ||
| 36 | + | ||
| 37 | +#define DEFINE_DIRENT_BUFFER(name, sz) \ | ||
| 38 | + union { \ | ||
| 39 | + struct dirent de; \ | ||
| 40 | + uint8_t data[(sz) * DIRENT_SIZE_MAX]; \ | ||
| 41 | + } name | ||
| 23 | diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c | 42 | diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c |
| 24 | index efa1797b7b..03ff10ebe9 100644 | 43 | index efa1797b7b..03ff10ebe9 100644 |
| 25 | --- a/src/basic/recurse-dir.c | 44 | --- a/src/basic/recurse-dir.c |
| @@ -34,18 +53,28 @@ index efa1797b7b..03ff10ebe9 100644 | |||
| 34 | return -errno; | 53 | return -errno; |
| 35 | if (n == 0) | 54 | if (n == 0) |
| 36 | diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c | 55 | diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c |
| 37 | index c2269844f8..7cd6c7fa42 100644 | 56 | index db22f06d0f..cb76726c37 100644 |
| 38 | --- a/src/basic/stat-util.c | 57 | --- a/src/basic/stat-util.c |
| 39 | +++ b/src/basic/stat-util.c | 58 | +++ b/src/basic/stat-util.c |
| 40 | @@ -99,7 +99,7 @@ int dir_is_empty_at(int dir_fd, const char *path) { | 59 | @@ -66,6 +66,10 @@ int is_device_node(const char *path) { |
| 60 | int dir_is_empty_at(int dir_fd, const char *path) { | ||
| 61 | _cleanup_close_ int fd = -1; | ||
| 62 | _cleanup_closedir_ DIR *d = NULL; | ||
| 63 | + /* Allocate space for at least 3 full dirents, since every dir has at least two entries ("." + | ||
| 64 | + * ".."), and only once we have seen if there's a third we know whether the dir is empty or not. */ | ||
| 65 | + DEFINE_DIRENT_BUFFER(buffer, 3); | ||
| 66 | + ssize_t n; | ||
| 67 | |||
| 68 | if (path) { | ||
| 69 | assert(dir_fd >= 0 || dir_fd == AT_FDCWD); | ||
| 70 | @@ -85,8 +89,8 @@ int dir_is_empty_at(int dir_fd, const char *path) { | ||
| 41 | return fd; | 71 | return fd; |
| 42 | } | 72 | } |
| 43 | 73 | ||
| 44 | - n = getdents64(fd, &buffer, sizeof(buffer)); | 74 | - d = take_fdopendir(&fd); |
| 75 | - if (!d) | ||
| 45 | + n = getdents64(fd, (struct dirent *)&buffer, sizeof(buffer)); | 76 | + n = getdents64(fd, (struct dirent *)&buffer, sizeof(buffer)); |
| 46 | if (n < 0) | 77 | + if (n < 0) |
| 47 | return -errno; | 78 | return -errno; |
| 48 | 79 | ||
| 49 | -- | 80 | FOREACH_DIRENT(de, d, return -errno) |
| 50 | 2.34.1 | ||
| 51 | |||
diff --git a/meta/recipes-core/systemd/systemd/0001-shared-json-allow-json_variant_dump-to-return-an-err.patch b/meta/recipes-core/systemd/systemd/0001-shared-json-allow-json_variant_dump-to-return-an-err.patch deleted file mode 100644 index b23b735507..0000000000 --- a/meta/recipes-core/systemd/systemd/0001-shared-json-allow-json_variant_dump-to-return-an-err.patch +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | From 25492154b42f68a48752a7f61eaf1fb61e454e52 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> | ||
| 3 | Date: Tue, 18 Oct 2022 18:09:06 +0200 | ||
| 4 | Subject: [PATCH] shared/json: allow json_variant_dump() to return an error | ||
| 5 | |||
| 6 | Upstream-Status: Backport [https://github.com/systemd/systemd/commit/7922ead507e0d83e4ec72a8cbd2b67194766e58c] | ||
| 7 | |||
| 8 | Needed to fix CVE-2022-45873.patch backported from systemd/main, | ||
| 9 | otherwise it fails to build with: | ||
| 10 | |||
| 11 | | ../git/src/shared/elf-util.c: In function 'parse_elf_object': | ||
| 12 | | ../git/src/shared/elf-util.c:792:27: error: void value not ignored as it ought to be | ||
| 13 | | 792 | r = json_variant_dump(package_metadata, JSON_FORMAT_FLUSH, json_out, NULL); | ||
| 14 | | | ^ | ||
| 15 | |||
| 16 | Signed-off-by: Martin Jansa <martin2.jansa@lgepartner.com> | ||
| 17 | --- | ||
| 18 | src/shared/json.c | 7 ++++--- | ||
| 19 | src/shared/json.h | 2 +- | ||
| 20 | 2 files changed, 5 insertions(+), 4 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/src/shared/json.c b/src/shared/json.c | ||
| 23 | index dff95eda26..81c05efe22 100644 | ||
| 24 | --- a/src/shared/json.c | ||
| 25 | +++ b/src/shared/json.c | ||
| 26 | @@ -1792,9 +1792,9 @@ int json_variant_format(JsonVariant *v, JsonFormatFlags flags, char **ret) { | ||
| 27 | return (int) sz - 1; | ||
| 28 | } | ||
| 29 | |||
| 30 | -void json_variant_dump(JsonVariant *v, JsonFormatFlags flags, FILE *f, const char *prefix) { | ||
| 31 | +int json_variant_dump(JsonVariant *v, JsonFormatFlags flags, FILE *f, const char *prefix) { | ||
| 32 | if (!v) | ||
| 33 | - return; | ||
| 34 | + return 0; | ||
| 35 | |||
| 36 | if (!f) | ||
| 37 | f = stdout; | ||
| 38 | @@ -1820,7 +1820,8 @@ void json_variant_dump(JsonVariant *v, JsonFormatFlags flags, FILE *f, const cha | ||
| 39 | fputc('\n', f); /* In case of SSE add a second newline */ | ||
| 40 | |||
| 41 | if (flags & JSON_FORMAT_FLUSH) | ||
| 42 | - fflush(f); | ||
| 43 | + return fflush_and_check(f); | ||
| 44 | + return 0; | ||
| 45 | } | ||
| 46 | |||
| 47 | int json_variant_filter(JsonVariant **v, char **to_remove) { | ||
| 48 | diff --git a/src/shared/json.h b/src/shared/json.h | ||
| 49 | index 8760354b66..c712700763 100644 | ||
| 50 | --- a/src/shared/json.h | ||
| 51 | +++ b/src/shared/json.h | ||
| 52 | @@ -187,7 +187,7 @@ typedef enum JsonFormatFlags { | ||
| 53 | } JsonFormatFlags; | ||
| 54 | |||
| 55 | int json_variant_format(JsonVariant *v, JsonFormatFlags flags, char **ret); | ||
| 56 | -void json_variant_dump(JsonVariant *v, JsonFormatFlags flags, FILE *f, const char *prefix); | ||
| 57 | +int json_variant_dump(JsonVariant *v, JsonFormatFlags flags, FILE *f, const char *prefix); | ||
| 58 | |||
| 59 | int json_variant_filter(JsonVariant **v, char **to_remove); | ||
| 60 | |||
diff --git a/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch b/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch index 8cf0546450..5ed907412f 100644 --- a/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch +++ b/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 4b731a5e2547b5292f9a774b849e14c0cf7b3955 Mon Sep 17 00:00:00 2001 | 1 | From 2e7d75e9a045f7580c60436dbee44301393a66c3 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 21 Jan 2022 15:17:37 -0800 | 3 | Date: Fri, 21 Jan 2022 15:17:37 -0800 |
| 4 | Subject: [PATCH] Add sys/stat.h for S_IFDIR | 4 | Subject: [PATCH] Add sys/stat.h for S_IFDIR |
| @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 14 | 1 file changed, 1 insertion(+) | 14 | 1 file changed, 1 insertion(+) |
| 15 | 15 | ||
| 16 | diff --git a/src/shared/mkdir-label.c b/src/shared/mkdir-label.c | 16 | diff --git a/src/shared/mkdir-label.c b/src/shared/mkdir-label.c |
| 17 | index d36a6466d7..63b764cd83 100644 | 17 | index 5b1ac5d1e0..fa5802b894 100644 |
| 18 | --- a/src/shared/mkdir-label.c | 18 | --- a/src/shared/mkdir-label.c |
| 19 | +++ b/src/shared/mkdir-label.c | 19 | +++ b/src/shared/mkdir-label.c |
| 20 | @@ -4,6 +4,7 @@ | 20 | @@ -6,6 +6,7 @@ |
| 21 | #include "selinux-util.h" | 21 | #include "selinux-util.h" |
| 22 | #include "smack-util.h" | 22 | #include "smack-util.h" |
| 23 | #include "user-util.h" | 23 | #include "user-util.h" |
diff --git a/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch index c28c8381e8..e1fedd71b8 100644 --- a/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch +++ b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 5513b918d02900a3a78fd0e0300a118b163edfef Mon Sep 17 00:00:00 2001 | 1 | From a134b05d2cbc0d05a5ad7d9ebbb4ba57d424752c Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Mon, 25 Feb 2019 13:55:12 +0800 | 3 | Date: Mon, 25 Feb 2019 13:55:12 +0800 |
| 4 | Subject: [PATCH] missing_type.h: add comparison_fn_t | 4 | Subject: [PATCH] missing_type.h: add comparison_fn_t |
| @@ -14,6 +14,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
| 14 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | 14 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> |
| 15 | [Rebased for v250, Drop __compare_fn_t] | 15 | [Rebased for v250, Drop __compare_fn_t] |
| 16 | Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> | 16 | Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> |
| 17 | |||
| 17 | --- | 18 | --- |
| 18 | src/basic/missing_type.h | 4 ++++ | 19 | src/basic/missing_type.h | 4 ++++ |
| 19 | src/basic/sort-util.h | 1 + | 20 | src/basic/sort-util.h | 1 + |
| @@ -56,6 +57,3 @@ index 8fc87b131a..36a6efdbd8 100644 | |||
| 56 | 57 | ||
| 57 | const char * const catalog_file_dirs[] = { | 58 | const char * const catalog_file_dirs[] = { |
| 58 | "/usr/local/lib/systemd/catalog/", | 59 | "/usr/local/lib/systemd/catalog/", |
| 59 | -- | ||
| 60 | 2.34.1 | ||
| 61 | |||
diff --git a/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch index 1bd538b0c0..c233560e52 100644 --- a/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch +++ b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 3d9910dcda697b1e361bba49c99050ee0d116742 Mon Sep 17 00:00:00 2001 | 1 | From e53661c4dc9b15397a87077169fe729934ce5e13 Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Sat, 22 May 2021 20:26:24 +0200 | 3 | Date: Sat, 22 May 2021 20:26:24 +0200 |
| 4 | Subject: [PATCH] add fallback parse_printf_format implementation | 4 | Subject: [PATCH] add fallback parse_printf_format implementation |
| @@ -23,10 +23,10 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
| 23 | create mode 100644 src/basic/parse-printf-format.h | 23 | create mode 100644 src/basic/parse-printf-format.h |
| 24 | 24 | ||
| 25 | diff --git a/meson.build b/meson.build | 25 | diff --git a/meson.build b/meson.build |
| 26 | index cb9936ee8b..ae53345260 100644 | 26 | index 01c4b4dc70..29129a83e2 100644 |
| 27 | --- a/meson.build | 27 | --- a/meson.build |
| 28 | +++ b/meson.build | 28 | +++ b/meson.build |
| 29 | @@ -686,6 +686,7 @@ endif | 29 | @@ -705,6 +705,7 @@ endif |
| 30 | foreach header : ['crypt.h', | 30 | foreach header : ['crypt.h', |
| 31 | 'linux/memfd.h', | 31 | 'linux/memfd.h', |
| 32 | 'linux/vm_sockets.h', | 32 | 'linux/vm_sockets.h', |
diff --git a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch index 680930ca3c..786f8304ac 100644 --- a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch +++ b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 106b7bd7186c9d6c1dcd72bd4ca6457d3fa72d0b Mon Sep 17 00:00:00 2001 | 1 | From 38c8e75938a439dd8f961a9ea4084deca0c46269 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Mon, 25 Feb 2019 14:18:21 +0800 | 3 | Date: Mon, 25 Feb 2019 14:18:21 +0800 |
| 4 | Subject: [PATCH] src/basic/missing.h: check for missing strndupa | 4 | Subject: [PATCH] src/basic/missing.h: check for missing strndupa |
| @@ -17,6 +17,7 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | |||
| 17 | [rebased for systemd 244] | 17 | [rebased for systemd 244] |
| 18 | [Rebased for v247] | 18 | [Rebased for v247] |
| 19 | Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | 19 | Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> |
| 20 | |||
| 20 | --- | 21 | --- |
| 21 | meson.build | 1 + | 22 | meson.build | 1 + |
| 22 | src/backlight/backlight.c | 1 + | 23 | src/backlight/backlight.c | 1 + |
| @@ -73,10 +74,10 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
| 73 | 52 files changed, 63 insertions(+) | 74 | 52 files changed, 63 insertions(+) |
| 74 | 75 | ||
| 75 | diff --git a/meson.build b/meson.build | 76 | diff --git a/meson.build b/meson.build |
| 76 | index cb9936ee8b..7ab201c6d9 100644 | 77 | index 29129a83e2..3fec6aac3e 100644 |
| 77 | --- a/meson.build | 78 | --- a/meson.build |
| 78 | +++ b/meson.build | 79 | +++ b/meson.build |
| 79 | @@ -507,6 +507,7 @@ foreach ident : ['secure_getenv', '__secure_getenv'] | 80 | @@ -526,6 +526,7 @@ foreach ident : ['secure_getenv', '__secure_getenv'] |
| 80 | endforeach | 81 | endforeach |
| 81 | 82 | ||
| 82 | foreach ident : [ | 83 | foreach ident : [ |
| @@ -97,7 +98,7 @@ index 5a3095cbba..22cfa4d526 100644 | |||
| 97 | static int help(void) { | 98 | static int help(void) { |
| 98 | _cleanup_free_ char *link = NULL; | 99 | _cleanup_free_ char *link = NULL; |
| 99 | diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c | 100 | diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c |
| 100 | index a626ecf2e2..f7dc6c8421 100644 | 101 | index e65ad678ab..d3bed80620 100644 |
| 101 | --- a/src/basic/cgroup-util.c | 102 | --- a/src/basic/cgroup-util.c |
| 102 | +++ b/src/basic/cgroup-util.c | 103 | +++ b/src/basic/cgroup-util.c |
| 103 | @@ -37,6 +37,7 @@ | 104 | @@ -37,6 +37,7 @@ |
| @@ -121,7 +122,7 @@ index 885967e7f3..d0b7dc845e 100644 | |||
| 121 | /* We follow bash for the character set. Different shells have different rules. */ | 122 | /* We follow bash for the character set. Different shells have different rules. */ |
| 122 | #define VALID_BASH_ENV_NAME_CHARS \ | 123 | #define VALID_BASH_ENV_NAME_CHARS \ |
| 123 | diff --git a/src/basic/log.c b/src/basic/log.c | 124 | diff --git a/src/basic/log.c b/src/basic/log.c |
| 124 | index 12071e2ebd..15254c7bbc 100644 | 125 | index 10de8bd7c0..4f0e7eaad3 100644 |
| 125 | --- a/src/basic/log.c | 126 | --- a/src/basic/log.c |
| 126 | +++ b/src/basic/log.c | 127 | +++ b/src/basic/log.c |
| 127 | @@ -36,6 +36,7 @@ | 128 | @@ -36,6 +36,7 @@ |
| @@ -153,7 +154,7 @@ index 8c76f93eb2..9068bfb4f0 100644 | |||
| 153 | + }) | 154 | + }) |
| 154 | +#endif | 155 | +#endif |
| 155 | diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c | 156 | diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c |
| 156 | index 51a0d74e87..03569f71f8 100644 | 157 | index 27144dd45a..0395c124da 100644 |
| 157 | --- a/src/basic/mkdir.c | 158 | --- a/src/basic/mkdir.c |
| 158 | +++ b/src/basic/mkdir.c | 159 | +++ b/src/basic/mkdir.c |
| 159 | @@ -15,6 +15,7 @@ | 160 | @@ -15,6 +15,7 @@ |
| @@ -237,7 +238,7 @@ index 65f96abb06..e485a0196b 100644 | |||
| 237 | int procfs_get_pid_max(uint64_t *ret) { | 238 | int procfs_get_pid_max(uint64_t *ret) { |
| 238 | _cleanup_free_ char *value = NULL; | 239 | _cleanup_free_ char *value = NULL; |
| 239 | diff --git a/src/basic/time-util.c b/src/basic/time-util.c | 240 | diff --git a/src/basic/time-util.c b/src/basic/time-util.c |
| 240 | index b659d6905d..020112be24 100644 | 241 | index 89dc593d44..ffbaffd451 100644 |
| 241 | --- a/src/basic/time-util.c | 242 | --- a/src/basic/time-util.c |
| 242 | +++ b/src/basic/time-util.c | 243 | +++ b/src/basic/time-util.c |
| 243 | @@ -26,6 +26,7 @@ | 244 | @@ -26,6 +26,7 @@ |
| @@ -273,7 +274,7 @@ index f0d8759e85..b4c1053e64 100644 | |||
| 273 | 274 | ||
| 274 | BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve); | 275 | BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve); |
| 275 | diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c | 276 | diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c |
| 276 | index 5c499e5d06..e7ab1bb9a5 100644 | 277 | index db1698393c..77cc8bb507 100644 |
| 277 | --- a/src/core/dbus-execute.c | 278 | --- a/src/core/dbus-execute.c |
| 278 | +++ b/src/core/dbus-execute.c | 279 | +++ b/src/core/dbus-execute.c |
| 279 | @@ -44,6 +44,7 @@ | 280 | @@ -44,6 +44,7 @@ |
| @@ -297,10 +298,10 @@ index 32a2ec0ff9..36be2511e4 100644 | |||
| 297 | int bus_property_get_triggered_unit( | 298 | int bus_property_get_triggered_unit( |
| 298 | sd_bus *bus, | 299 | sd_bus *bus, |
| 299 | diff --git a/src/core/execute.c b/src/core/execute.c | 300 | diff --git a/src/core/execute.c b/src/core/execute.c |
| 300 | index 0b20d386d3..fccfb9268c 100644 | 301 | index da0cd2dcbe..d2a7bf7e7b 100644 |
| 301 | --- a/src/core/execute.c | 302 | --- a/src/core/execute.c |
| 302 | +++ b/src/core/execute.c | 303 | +++ b/src/core/execute.c |
| 303 | @@ -102,6 +102,7 @@ | 304 | @@ -103,6 +103,7 @@ |
| 304 | #include "unit-serialize.h" | 305 | #include "unit-serialize.h" |
| 305 | #include "user-util.h" | 306 | #include "user-util.h" |
| 306 | #include "utmp-wtmp.h" | 307 | #include "utmp-wtmp.h" |
| @@ -321,7 +322,7 @@ index d054668b8e..9b4caa7651 100644 | |||
| 321 | #if HAVE_KMOD | 322 | #if HAVE_KMOD |
| 322 | #include "module-util.h" | 323 | #include "module-util.h" |
| 323 | diff --git a/src/core/service.c b/src/core/service.c | 324 | diff --git a/src/core/service.c b/src/core/service.c |
| 324 | index 87f0d34c8c..ccda3feb29 100644 | 325 | index e02c2e38ad..2a64a14647 100644 |
| 325 | --- a/src/core/service.c | 326 | --- a/src/core/service.c |
| 326 | +++ b/src/core/service.c | 327 | +++ b/src/core/service.c |
| 327 | @@ -42,6 +42,7 @@ | 328 | @@ -42,6 +42,7 @@ |
| @@ -369,7 +370,7 @@ index 3e3646e45f..6a8fc60f6d 100644 | |||
| 369 | #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem" | 370 | #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem" |
| 370 | #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" | 371 | #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" |
| 371 | diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c | 372 | diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c |
| 372 | index 3c4a7c0a7a..6a792404f2 100644 | 373 | index d4a751c575..b175b11a8f 100644 |
| 373 | --- a/src/journal/journalctl.c | 374 | --- a/src/journal/journalctl.c |
| 374 | +++ b/src/journal/journalctl.c | 375 | +++ b/src/journal/journalctl.c |
| 375 | @@ -73,6 +73,7 @@ | 376 | @@ -73,6 +73,7 @@ |
| @@ -381,7 +382,7 @@ index 3c4a7c0a7a..6a792404f2 100644 | |||
| 381 | #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) | 382 | #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) |
| 382 | #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ | 383 | #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ |
| 383 | diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c | 384 | diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c |
| 384 | index 96529b422b..ddb5e9c698 100644 | 385 | index ca0b290ed2..3fa703eb61 100644 |
| 385 | --- a/src/libsystemd/sd-bus/bus-message.c | 386 | --- a/src/libsystemd/sd-bus/bus-message.c |
| 386 | +++ b/src/libsystemd/sd-bus/bus-message.c | 387 | +++ b/src/libsystemd/sd-bus/bus-message.c |
| 387 | @@ -20,6 +20,7 @@ | 388 | @@ -20,6 +20,7 @@ |
| @@ -393,11 +394,11 @@ index 96529b422b..ddb5e9c698 100644 | |||
| 393 | static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); | 394 | static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); |
| 394 | 395 | ||
| 395 | diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c | 396 | diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c |
| 396 | index 28d8336718..5d3ce88a53 100644 | 397 | index 5c6c6c5c5f..00499d53d1 100644 |
| 397 | --- a/src/libsystemd/sd-bus/bus-objects.c | 398 | --- a/src/libsystemd/sd-bus/bus-objects.c |
| 398 | +++ b/src/libsystemd/sd-bus/bus-objects.c | 399 | +++ b/src/libsystemd/sd-bus/bus-objects.c |
| 399 | @@ -12,6 +12,7 @@ | 400 | @@ -11,6 +11,7 @@ |
| 400 | #include "set.h" | 401 | #include "missing_capability.h" |
| 401 | #include "string-util.h" | 402 | #include "string-util.h" |
| 402 | #include "strv.h" | 403 | #include "strv.h" |
| 403 | +#include "missing_stdlib.h" | 404 | +#include "missing_stdlib.h" |
| @@ -405,7 +406,7 @@ index 28d8336718..5d3ce88a53 100644 | |||
| 405 | static int node_vtable_get_userdata( | 406 | static int node_vtable_get_userdata( |
| 406 | sd_bus *bus, | 407 | sd_bus *bus, |
| 407 | diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c | 408 | diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c |
| 408 | index 14951ccb33..b7f86ca501 100644 | 409 | index af67fc70eb..f80afa8327 100644 |
| 409 | --- a/src/libsystemd/sd-bus/bus-socket.c | 410 | --- a/src/libsystemd/sd-bus/bus-socket.c |
| 410 | +++ b/src/libsystemd/sd-bus/bus-socket.c | 411 | +++ b/src/libsystemd/sd-bus/bus-socket.c |
| 411 | @@ -28,6 +28,7 @@ | 412 | @@ -28,6 +28,7 @@ |
| @@ -417,7 +418,7 @@ index 14951ccb33..b7f86ca501 100644 | |||
| 417 | #define SNDBUF_SIZE (8*1024*1024) | 418 | #define SNDBUF_SIZE (8*1024*1024) |
| 418 | 419 | ||
| 419 | diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c | 420 | diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c |
| 420 | index 9e1d29cc1d..8c3165f0ce 100644 | 421 | index 8f12be6d56..01945df0c4 100644 |
| 421 | --- a/src/libsystemd/sd-bus/sd-bus.c | 422 | --- a/src/libsystemd/sd-bus/sd-bus.c |
| 422 | +++ b/src/libsystemd/sd-bus/sd-bus.c | 423 | +++ b/src/libsystemd/sd-bus/sd-bus.c |
| 423 | @@ -43,6 +43,7 @@ | 424 | @@ -43,6 +43,7 @@ |
| @@ -441,7 +442,7 @@ index 317653bedc..d028216c48 100644 | |||
| 441 | #define MAX_SIZE (2*1024*1024) | 442 | #define MAX_SIZE (2*1024*1024) |
| 442 | 443 | ||
| 443 | diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c | 444 | diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c |
| 444 | index 7a6cc4aca3..b7f7cd65c5 100644 | 445 | index de9deb2e6d..6f4e1856d5 100644 |
| 445 | --- a/src/libsystemd/sd-journal/sd-journal.c | 446 | --- a/src/libsystemd/sd-journal/sd-journal.c |
| 446 | +++ b/src/libsystemd/sd-journal/sd-journal.c | 447 | +++ b/src/libsystemd/sd-journal/sd-journal.c |
| 447 | @@ -41,6 +41,7 @@ | 448 | @@ -41,6 +41,7 @@ |
| @@ -450,10 +451,10 @@ index 7a6cc4aca3..b7f7cd65c5 100644 | |||
| 450 | #include "syslog-util.h" | 451 | #include "syslog-util.h" |
| 451 | +#include "missing_stdlib.h" | 452 | +#include "missing_stdlib.h" |
| 452 | 453 | ||
| 453 | #define JOURNAL_FILES_MAX 7168 | 454 | #define JOURNAL_FILES_RECHECK_USEC (2 * USEC_PER_SEC) |
| 454 | 455 | ||
| 455 | diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c | 456 | diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c |
| 456 | index 10d2ed7aec..4fbe3f6b4a 100644 | 457 | index eaa1c6f0d2..7014c1e227 100644 |
| 457 | --- a/src/locale/keymap-util.c | 458 | --- a/src/locale/keymap-util.c |
| 458 | +++ b/src/locale/keymap-util.c | 459 | +++ b/src/locale/keymap-util.c |
| 459 | @@ -24,6 +24,7 @@ | 460 | @@ -24,6 +24,7 @@ |
| @@ -489,7 +490,7 @@ index 063ad08d80..f9823a433b 100644 | |||
| 489 | /* | 490 | /* |
| 490 | # .network | 491 | # .network |
| 491 | diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c | 492 | diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c |
| 492 | index 1f58bf3ed4..8457a3b0e3 100644 | 493 | index c4be8f5d4e..04ab34f165 100644 |
| 493 | --- a/src/nspawn/nspawn-settings.c | 494 | --- a/src/nspawn/nspawn-settings.c |
| 494 | +++ b/src/nspawn/nspawn-settings.c | 495 | +++ b/src/nspawn/nspawn-settings.c |
| 495 | @@ -17,6 +17,7 @@ | 496 | @@ -17,6 +17,7 @@ |
| @@ -513,7 +514,7 @@ index c64e79bdff..eda26b0b9a 100644 | |||
| 513 | static void setup_logging_once(void) { | 514 | static void setup_logging_once(void) { |
| 514 | static pthread_once_t once = PTHREAD_ONCE_INIT; | 515 | static pthread_once_t once = PTHREAD_ONCE_INIT; |
| 515 | diff --git a/src/portable/portable.c b/src/portable/portable.c | 516 | diff --git a/src/portable/portable.c b/src/portable/portable.c |
| 516 | index 0e6461ba93..54148d5924 100644 | 517 | index 3f73151bfe..452cadb764 100644 |
| 517 | --- a/src/portable/portable.c | 518 | --- a/src/portable/portable.c |
| 518 | +++ b/src/portable/portable.c | 519 | +++ b/src/portable/portable.c |
| 519 | @@ -39,6 +39,7 @@ | 520 | @@ -39,6 +39,7 @@ |
| @@ -525,7 +526,7 @@ index 0e6461ba93..54148d5924 100644 | |||
| 525 | /* Markers used in the first line of our 20-portable.conf unit file drop-in to determine, that a) the unit file was | 526 | /* Markers used in the first line of our 20-portable.conf unit file drop-in to determine, that a) the unit file was |
| 526 | * dropped there by the portable service logic and b) for which image it was dropped there. */ | 527 | * dropped there by the portable service logic and b) for which image it was dropped there. */ |
| 527 | diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c | 528 | diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c |
| 528 | index 5b3ceeff36..d36d1d57ae 100644 | 529 | index 5ec4b63568..5a6a32f691 100644 |
| 529 | --- a/src/resolve/resolvectl.c | 530 | --- a/src/resolve/resolvectl.c |
| 530 | +++ b/src/resolve/resolvectl.c | 531 | +++ b/src/resolve/resolvectl.c |
| 531 | @@ -43,6 +43,7 @@ | 532 | @@ -43,6 +43,7 @@ |
| @@ -561,7 +562,7 @@ index 87c0334fec..402ab3493b 100644 | |||
| 561 | struct CGroupInfo { | 562 | struct CGroupInfo { |
| 562 | char *cgroup_path; | 563 | char *cgroup_path; |
| 563 | diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c | 564 | diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c |
| 564 | index dcce530c99..faf5a5bda0 100644 | 565 | index ef134bcee4..48a5c3bec6 100644 |
| 565 | --- a/src/shared/bus-unit-util.c | 566 | --- a/src/shared/bus-unit-util.c |
| 566 | +++ b/src/shared/bus-unit-util.c | 567 | +++ b/src/shared/bus-unit-util.c |
| 567 | @@ -49,6 +49,7 @@ | 568 | @@ -49,6 +49,7 @@ |
| @@ -585,7 +586,7 @@ index 4a2b7684bc..ee6d687c58 100644 | |||
| 585 | static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { | 586 | static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { |
| 586 | sd_event *e = userdata; | 587 | sd_event *e = userdata; |
| 587 | diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c | 588 | diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c |
| 588 | index f54b187a1b..299758c7e4 100644 | 589 | index 5e0d921487..f9a39b60d9 100644 |
| 589 | --- a/src/shared/dns-domain.c | 590 | --- a/src/shared/dns-domain.c |
| 590 | +++ b/src/shared/dns-domain.c | 591 | +++ b/src/shared/dns-domain.c |
| 591 | @@ -17,6 +17,7 @@ | 592 | @@ -17,6 +17,7 @@ |
| @@ -609,7 +610,7 @@ index c6caf9330a..ebe33bd44a 100644 | |||
| 609 | enum { | 610 | enum { |
| 610 | IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ | 611 | IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ |
| 611 | diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c | 612 | diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c |
| 612 | index cf83eb6bca..e672a003a3 100644 | 613 | index e2315e6eb1..65533b412c 100644 |
| 613 | --- a/src/shared/logs-show.c | 614 | --- a/src/shared/logs-show.c |
| 614 | +++ b/src/shared/logs-show.c | 615 | +++ b/src/shared/logs-show.c |
| 615 | @@ -42,6 +42,7 @@ | 616 | @@ -42,6 +42,7 @@ |
| @@ -669,7 +670,7 @@ index cc9a7cb838..a679614a47 100644 | |||
| 669 | 670 | ||
| 670 | TEST(hexchar) { | 671 | TEST(hexchar) { |
| 671 | diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c | 672 | diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c |
| 672 | index ae92e45205..1e6f3205cb 100644 | 673 | index 1084eb2d81..db07b84124 100644 |
| 673 | --- a/src/udev/udev-builtin-path_id.c | 674 | --- a/src/udev/udev-builtin-path_id.c |
| 674 | +++ b/src/udev/udev-builtin-path_id.c | 675 | +++ b/src/udev/udev-builtin-path_id.c |
| 675 | @@ -22,6 +22,7 @@ | 676 | @@ -22,6 +22,7 @@ |
| @@ -693,7 +694,7 @@ index a60e4f294c..571c43765b 100644 | |||
| 693 | typedef struct Spawn { | 694 | typedef struct Spawn { |
| 694 | sd_device *device; | 695 | sd_device *device; |
| 695 | diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c | 696 | diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c |
| 696 | index 1a384d6b38..0089833e3f 100644 | 697 | index cf461e1e68..9d6431d865 100644 |
| 697 | --- a/src/udev/udev-rules.c | 698 | --- a/src/udev/udev-rules.c |
| 698 | +++ b/src/udev/udev-rules.c | 699 | +++ b/src/udev/udev-rules.c |
| 699 | @@ -34,6 +34,7 @@ | 700 | @@ -34,6 +34,7 @@ |
| @@ -704,6 +705,3 @@ index 1a384d6b38..0089833e3f 100644 | |||
| 704 | 705 | ||
| 705 | #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") | 706 | #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") |
| 706 | 707 | ||
| 707 | -- | ||
| 708 | 2.34.1 | ||
| 709 | |||
diff --git a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch index b84fbaa67e..f3285b7a31 100644 --- a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch +++ b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 74c664bcd6b9a5fcf3466310c07f608d12456f7f Mon Sep 17 00:00:00 2001 | 1 | From 5de6ab5196cfd629f4a15f8d0d34f69b1e425715 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Mon, 25 Feb 2019 14:56:21 +0800 | 3 | Date: Mon, 25 Feb 2019 14:56:21 +0800 |
| 4 | Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined | 4 | Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined |
| @@ -115,7 +115,7 @@ index ec8b74f48f..d99a6095df 100644 | |||
| 115 | 115 | ||
| 116 | (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); | 116 | (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); |
| 117 | diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c | 117 | diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c |
| 118 | index fcab51c208..fdef1807ae 100644 | 118 | index 07ef3af0a0..8293661aa7 100644 |
| 119 | --- a/src/tmpfiles/tmpfiles.c | 119 | --- a/src/tmpfiles/tmpfiles.c |
| 120 | +++ b/src/tmpfiles/tmpfiles.c | 120 | +++ b/src/tmpfiles/tmpfiles.c |
| 121 | @@ -67,6 +67,12 @@ | 121 | @@ -67,6 +67,12 @@ |
| @@ -131,7 +131,7 @@ index fcab51c208..fdef1807ae 100644 | |||
| 131 | /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates | 131 | /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates |
| 132 | * them in the file system. This is intended to be used to create | 132 | * them in the file system. This is intended to be used to create |
| 133 | * properly owned directories beneath /tmp, /var/tmp, /run, which are | 133 | * properly owned directories beneath /tmp, /var/tmp, /run, which are |
| 134 | @@ -1961,7 +1967,9 @@ finish: | 134 | @@ -1958,7 +1964,9 @@ finish: |
| 135 | 135 | ||
| 136 | static int glob_item(Item *i, action_t action) { | 136 | static int glob_item(Item *i, action_t action) { |
| 137 | _cleanup_globfree_ glob_t g = { | 137 | _cleanup_globfree_ glob_t g = { |
| @@ -141,7 +141,7 @@ index fcab51c208..fdef1807ae 100644 | |||
| 141 | }; | 141 | }; |
| 142 | int r = 0, k; | 142 | int r = 0, k; |
| 143 | char **fn; | 143 | char **fn; |
| 144 | @@ -1981,7 +1989,9 @@ static int glob_item(Item *i, action_t action) { | 144 | @@ -1978,7 +1986,9 @@ static int glob_item(Item *i, action_t action) { |
| 145 | 145 | ||
| 146 | static int glob_item_recursively(Item *i, fdaction_t action) { | 146 | static int glob_item_recursively(Item *i, fdaction_t action) { |
| 147 | _cleanup_globfree_ glob_t g = { | 147 | _cleanup_globfree_ glob_t g = { |
diff --git a/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch b/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch index 0c0d3d0b62..718dc659c9 100644 --- a/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch +++ b/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From a0450f7909348e7ff1d58adc0aee4119a0519c1f Mon Sep 17 00:00:00 2001 | 1 | From 427534fec8c205a9a97b20a4075dd84e1faca611 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Mon, 25 Feb 2019 15:00:06 +0800 | 3 | Date: Mon, 25 Feb 2019 15:00:06 +0800 |
| 4 | Subject: [PATCH] add missing FTW_ macros for musl | 4 | Subject: [PATCH] add missing FTW_ macros for musl |
| @@ -49,7 +49,7 @@ index 6c0456349d..5140892e22 100644 | |||
| 49 | +#define FTW_SKIP_SIBLINGS 3 | 49 | +#define FTW_SKIP_SIBLINGS 3 |
| 50 | +#endif | 50 | +#endif |
| 51 | diff --git a/src/shared/mount-setup.c b/src/shared/mount-setup.c | 51 | diff --git a/src/shared/mount-setup.c b/src/shared/mount-setup.c |
| 52 | index 7917968497..cc3d5baaab 100644 | 52 | index 7ba579ef63..2d62b1978f 100644 |
| 53 | --- a/src/shared/mount-setup.c | 53 | --- a/src/shared/mount-setup.c |
| 54 | +++ b/src/shared/mount-setup.c | 54 | +++ b/src/shared/mount-setup.c |
| 55 | @@ -32,6 +32,7 @@ | 55 | @@ -32,6 +32,7 @@ |
diff --git a/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch index e7b7269f95..ea2b7f0aa3 100644 --- a/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch +++ b/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 3ca0920429f7eaf8c59f9ac8afd30a43b83d95ed Mon Sep 17 00:00:00 2001 | 1 | From fefd1b6ae9dd75133f86c373ce17d4f15ef05e2d Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Mon, 25 Feb 2019 15:03:47 +0800 | 3 | Date: Mon, 25 Feb 2019 15:03:47 +0800 |
| 4 | Subject: [PATCH] fix missing of __register_atfork for non-glibc builds | 4 | Subject: [PATCH] fix missing of __register_atfork for non-glibc builds |
| @@ -15,7 +15,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
| 15 | 1 file changed, 7 insertions(+) | 15 | 1 file changed, 7 insertions(+) |
| 16 | 16 | ||
| 17 | diff --git a/src/basic/process-util.c b/src/basic/process-util.c | 17 | diff --git a/src/basic/process-util.c b/src/basic/process-util.c |
| 18 | index c971852158..df6e85b1fc 100644 | 18 | index 5e27097cbb..db252b8dfe 100644 |
| 19 | --- a/src/basic/process-util.c | 19 | --- a/src/basic/process-util.c |
| 20 | +++ b/src/basic/process-util.c | 20 | +++ b/src/basic/process-util.c |
| 21 | @@ -18,6 +18,9 @@ | 21 | @@ -18,6 +18,9 @@ |
| @@ -28,7 +28,7 @@ index c971852158..df6e85b1fc 100644 | |||
| 28 | 28 | ||
| 29 | #include "alloc-util.h" | 29 | #include "alloc-util.h" |
| 30 | #include "architecture.h" | 30 | #include "architecture.h" |
| 31 | @@ -1161,11 +1164,15 @@ void reset_cached_pid(void) { | 31 | @@ -1165,11 +1168,15 @@ void reset_cached_pid(void) { |
| 32 | cached_pid = CACHED_PID_UNSET; | 32 | cached_pid = CACHED_PID_UNSET; |
| 33 | } | 33 | } |
| 34 | 34 | ||
diff --git a/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch b/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch index 3a47d09e8a..a8e45030ba 100644 --- a/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch +++ b/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 48a791aae7a47a2a08e9e60c18054071a43b8cda Mon Sep 17 00:00:00 2001 | 1 | From 4bf0a67c097c53129c772aab6123740d07b66823 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Mon, 25 Feb 2019 15:12:41 +0800 | 3 | Date: Mon, 25 Feb 2019 15:12:41 +0800 |
| 4 | Subject: [PATCH] Use uintmax_t for handling rlim_t | 4 | Subject: [PATCH] Use uintmax_t for handling rlim_t |
| @@ -87,10 +87,10 @@ index 33dfde9d6c..e018fd81fd 100644 | |||
| 87 | return 1; | 87 | return 1; |
| 88 | } | 88 | } |
| 89 | diff --git a/src/core/execute.c b/src/core/execute.c | 89 | diff --git a/src/core/execute.c b/src/core/execute.c |
| 90 | index fccfb9268c..90f00e10a5 100644 | 90 | index d2a7bf7e7b..0cc806b929 100644 |
| 91 | --- a/src/core/execute.c | 91 | --- a/src/core/execute.c |
| 92 | +++ b/src/core/execute.c | 92 | +++ b/src/core/execute.c |
| 93 | @@ -5633,9 +5633,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { | 93 | @@ -5671,9 +5671,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { |
| 94 | for (unsigned i = 0; i < RLIM_NLIMITS; i++) | 94 | for (unsigned i = 0; i < RLIM_NLIMITS; i++) |
| 95 | if (c->rlimit[i]) { | 95 | if (c->rlimit[i]) { |
| 96 | fprintf(f, "%sLimit%s: " RLIM_FMT "\n", | 96 | fprintf(f, "%sLimit%s: " RLIM_FMT "\n", |
diff --git a/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch index 7e4587cc23..a91ecea6be 100644 --- a/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch +++ b/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From e8025c8eefdf1be4bba34c48f3430838f3859c52 Mon Sep 17 00:00:00 2001 | 1 | From 755d647dc2e0842b89c29211af839c4e61faf006 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Wed, 28 Feb 2018 21:25:22 -0800 | 3 | Date: Wed, 28 Feb 2018 21:25:22 -0800 |
| 4 | Subject: [PATCH] test-sizeof.c: Disable tests for missing typedefs in musl | 4 | Subject: [PATCH] test-sizeof.c: Disable tests for missing typedefs in musl |
diff --git a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch index 6eecd3197c..68ad2a32d9 100644 --- a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +++ b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 46fdc959257d60d9b32953cae0152ae118f8564b Mon Sep 17 00:00:00 2001 | 1 | From 5667af9b7ee73ee5a003221aaca5337c306469c7 Mon Sep 17 00:00:00 2001 |
| 2 | From: Andre McCurdy <armccurdy@gmail.com> | 2 | From: Andre McCurdy <armccurdy@gmail.com> |
| 3 | Date: Tue, 10 Oct 2017 14:33:30 -0700 | 3 | Date: Tue, 10 Oct 2017 14:33:30 -0700 |
| 4 | Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() | 4 | Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() |
| @@ -65,7 +65,7 @@ index 0bbb3f6298..3dc494dbfb 100644 | |||
| 65 | int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); | 65 | int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); |
| 66 | int touch(const char *path); | 66 | int touch(const char *path); |
| 67 | diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c | 67 | diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c |
| 68 | index 5f5328c8cf..d396bc99fe 100644 | 68 | index 2847bcb0fb..fc534435d3 100644 |
| 69 | --- a/src/shared/base-filesystem.c | 69 | --- a/src/shared/base-filesystem.c |
| 70 | +++ b/src/shared/base-filesystem.c | 70 | +++ b/src/shared/base-filesystem.c |
| 71 | @@ -117,7 +117,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { | 71 | @@ -117,7 +117,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { |
diff --git a/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch index 7b22d6214f..76642f90f6 100644 --- a/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch +++ b/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From d0bdce977b7acc5e45e82cf84256c4bedc0e74c4 Mon Sep 17 00:00:00 2001 | 1 | From 1a1ae5dfb989af0e5f6294e26e0c12f49705860b Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sun, 27 May 2018 08:36:44 -0700 | 3 | Date: Sun, 27 May 2018 08:36:44 -0700 |
| 4 | Subject: [PATCH] Define glibc compatible basename() for non-glibc systems | 4 | Subject: [PATCH] Define glibc compatible basename() for non-glibc systems |
diff --git a/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch index 015347cb6a..60ff964e7d 100644 --- a/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +++ b/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From e480d28305907c3874f4e58b722b8aa43c3ac7a2 Mon Sep 17 00:00:00 2001 | 1 | From 61158232373ec55693e8fa4513b8fcdfb875ecda Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Wed, 4 Jul 2018 15:00:44 +0800 | 3 | Date: Wed, 4 Jul 2018 15:00:44 +0800 |
| 4 | Subject: [PATCH] Do not disable buffering when writing to oom_score_adj | 4 | Subject: [PATCH] Do not disable buffering when writing to oom_score_adj |
| @@ -25,10 +25,10 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
| 25 | 1 file changed, 1 insertion(+), 1 deletion(-) | 25 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 26 | 26 | ||
| 27 | diff --git a/src/basic/process-util.c b/src/basic/process-util.c | 27 | diff --git a/src/basic/process-util.c b/src/basic/process-util.c |
| 28 | index df6e85b1fc..635dbb5d26 100644 | 28 | index db252b8dfe..66bdc74b3f 100644 |
| 29 | --- a/src/basic/process-util.c | 29 | --- a/src/basic/process-util.c |
| 30 | +++ b/src/basic/process-util.c | 30 | +++ b/src/basic/process-util.c |
| 31 | @@ -1489,7 +1489,7 @@ int set_oom_score_adjust(int value) { | 31 | @@ -1493,7 +1493,7 @@ int set_oom_score_adjust(int value) { |
| 32 | xsprintf(t, "%i", value); | 32 | xsprintf(t, "%i", value); |
| 33 | 33 | ||
| 34 | return write_string_file("/proc/self/oom_score_adj", t, | 34 | return write_string_file("/proc/self/oom_score_adj", t, |
diff --git a/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch index c563982607..2312dcde68 100644 --- a/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch +++ b/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 0542d27ebbb250c09bdcfcf9f2ea3d27426fe522 Mon Sep 17 00:00:00 2001 | 1 | From 3a3c61daffa79ce7b70b6b851110ce13c652d731 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Tue, 10 Jul 2018 15:40:17 +0800 | 3 | Date: Tue, 10 Jul 2018 15:40:17 +0800 |
| 4 | Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi | 4 | Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi |
diff --git a/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch b/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch index 1fcba7af08..943e2b2889 100644 --- a/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch +++ b/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From e1d0210b47906dd121f936f3181092835df6a95c Mon Sep 17 00:00:00 2001 | 1 | From b90e69cab3da08fa890e8d276be4d02e39cd83aa Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Mon, 25 Feb 2019 15:44:54 +0800 | 3 | Date: Mon, 25 Feb 2019 15:44:54 +0800 |
| 4 | Subject: [PATCH] avoid redefinition of prctl_mm_map structure | 4 | Subject: [PATCH] avoid redefinition of prctl_mm_map structure |
diff --git a/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch b/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch index 82a01f732e..776fcdd6ca 100644 --- a/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch +++ b/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From e10a73de254b570bbc29b26423dbb86b4265bb05 Mon Sep 17 00:00:00 2001 | 1 | From 4f39aa56e738d99ac04e73ba75713db7e05f7252 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Mon, 25 Feb 2019 16:53:06 +0800 | 3 | Date: Mon, 25 Feb 2019 16:53:06 +0800 |
| 4 | Subject: [PATCH] test-json.c: define M_PIl | 4 | Subject: [PATCH] test-json.c: define M_PIl |
| @@ -19,7 +19,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
| 19 | 1 file changed, 4 insertions(+) | 19 | 1 file changed, 4 insertions(+) |
| 20 | 20 | ||
| 21 | diff --git a/src/test/test-json.c b/src/test/test-json.c | 21 | diff --git a/src/test/test-json.c b/src/test/test-json.c |
| 22 | index b385edc269..5e5830238c 100644 | 22 | index 2aecbe3557..f7112dc374 100644 |
| 23 | --- a/src/test/test-json.c | 23 | --- a/src/test/test-json.c |
| 24 | +++ b/src/test/test-json.c | 24 | +++ b/src/test/test-json.c |
| 25 | @@ -14,6 +14,10 @@ | 25 | @@ -14,6 +14,10 @@ |
diff --git a/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch b/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch index 4dd6ff6e2e..8e1b8f25fa 100644 --- a/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch +++ b/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 414e2f97008a1f3c26a260a6dc4d51a8c1fa6900 Mon Sep 17 00:00:00 2001 | 1 | From e79028fbfcc3036df8c2de9d199e4d89cbfff017 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Fri, 1 Mar 2019 15:22:15 +0800 | 3 | Date: Fri, 1 Mar 2019 15:22:15 +0800 |
| 4 | Subject: [PATCH] do not disable buffer in writing files | 4 | Subject: [PATCH] do not disable buffer in writing files |
| @@ -44,10 +44,10 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
| 44 | 21 files changed, 39 insertions(+), 40 deletions(-) | 44 | 21 files changed, 39 insertions(+), 40 deletions(-) |
| 45 | 45 | ||
| 46 | diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c | 46 | diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c |
| 47 | index f7dc6c8421..5f7a27c2c4 100644 | 47 | index d3bed80620..9af2339353 100644 |
| 48 | --- a/src/basic/cgroup-util.c | 48 | --- a/src/basic/cgroup-util.c |
| 49 | +++ b/src/basic/cgroup-util.c | 49 | +++ b/src/basic/cgroup-util.c |
| 50 | @@ -390,7 +390,7 @@ int cg_kill_kernel_sigkill(const char *controller, const char *path) { | 50 | @@ -399,7 +399,7 @@ int cg_kill_kernel_sigkill(const char *controller, const char *path) { |
| 51 | if (r < 0) | 51 | if (r < 0) |
| 52 | return r; | 52 | return r; |
| 53 | 53 | ||
| @@ -56,7 +56,7 @@ index f7dc6c8421..5f7a27c2c4 100644 | |||
| 56 | if (r < 0) | 56 | if (r < 0) |
| 57 | return r; | 57 | return r; |
| 58 | 58 | ||
| 59 | @@ -803,7 +803,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { | 59 | @@ -812,7 +812,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { |
| 60 | 60 | ||
| 61 | sc = strstrip(contents); | 61 | sc = strstrip(contents); |
| 62 | if (isempty(sc)) { | 62 | if (isempty(sc)) { |
| @@ -65,7 +65,7 @@ index f7dc6c8421..5f7a27c2c4 100644 | |||
| 65 | if (r < 0) | 65 | if (r < 0) |
| 66 | return r; | 66 | return r; |
| 67 | } else if (!path_equal(sc, agent)) | 67 | } else if (!path_equal(sc, agent)) |
| 68 | @@ -821,7 +821,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { | 68 | @@ -830,7 +830,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { |
| 69 | 69 | ||
| 70 | sc = strstrip(contents); | 70 | sc = strstrip(contents); |
| 71 | if (streq(sc, "0")) { | 71 | if (streq(sc, "0")) { |
| @@ -74,7 +74,7 @@ index f7dc6c8421..5f7a27c2c4 100644 | |||
| 74 | if (r < 0) | 74 | if (r < 0) |
| 75 | return r; | 75 | return r; |
| 76 | 76 | ||
| 77 | @@ -848,7 +848,7 @@ int cg_uninstall_release_agent(const char *controller) { | 77 | @@ -857,7 +857,7 @@ int cg_uninstall_release_agent(const char *controller) { |
| 78 | if (r < 0) | 78 | if (r < 0) |
| 79 | return r; | 79 | return r; |
| 80 | 80 | ||
| @@ -83,7 +83,7 @@ index f7dc6c8421..5f7a27c2c4 100644 | |||
| 83 | if (r < 0) | 83 | if (r < 0) |
| 84 | return r; | 84 | return r; |
| 85 | 85 | ||
| 86 | @@ -858,7 +858,7 @@ int cg_uninstall_release_agent(const char *controller) { | 86 | @@ -867,7 +867,7 @@ int cg_uninstall_release_agent(const char *controller) { |
| 87 | if (r < 0) | 87 | if (r < 0) |
| 88 | return r; | 88 | return r; |
| 89 | 89 | ||
| @@ -92,7 +92,7 @@ index f7dc6c8421..5f7a27c2c4 100644 | |||
| 92 | if (r < 0) | 92 | if (r < 0) |
| 93 | return r; | 93 | return r; |
| 94 | 94 | ||
| 95 | @@ -1704,7 +1704,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri | 95 | @@ -1713,7 +1713,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri |
| 96 | if (r < 0) | 96 | if (r < 0) |
| 97 | return r; | 97 | return r; |
| 98 | 98 | ||
| @@ -198,7 +198,7 @@ index 18231c2618..6c598d55c8 100644 | |||
| 198 | log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m"); | 198 | log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m"); |
| 199 | else | 199 | else |
| 200 | diff --git a/src/core/cgroup.c b/src/core/cgroup.c | 200 | diff --git a/src/core/cgroup.c b/src/core/cgroup.c |
| 201 | index f58de95a49..7a97ab6f99 100644 | 201 | index 79681c65be..a346e5d35c 100644 |
| 202 | --- a/src/core/cgroup.c | 202 | --- a/src/core/cgroup.c |
| 203 | +++ b/src/core/cgroup.c | 203 | +++ b/src/core/cgroup.c |
| 204 | @@ -4140,7 +4140,7 @@ int unit_cgroup_freezer_action(Unit *u, FreezerAction action) { | 204 | @@ -4140,7 +4140,7 @@ int unit_cgroup_freezer_action(Unit *u, FreezerAction action) { |
| @@ -211,10 +211,10 @@ index f58de95a49..7a97ab6f99 100644 | |||
| 211 | return r; | 211 | return r; |
| 212 | 212 | ||
| 213 | diff --git a/src/core/main.c b/src/core/main.c | 213 | diff --git a/src/core/main.c b/src/core/main.c |
| 214 | index 57aedb9b93..7ef36d22f5 100644 | 214 | index 5914be6a83..a4706203f1 100644 |
| 215 | --- a/src/core/main.c | 215 | --- a/src/core/main.c |
| 216 | +++ b/src/core/main.c | 216 | +++ b/src/core/main.c |
| 217 | @@ -1466,7 +1466,7 @@ static int bump_unix_max_dgram_qlen(void) { | 217 | @@ -1468,7 +1468,7 @@ static int bump_unix_max_dgram_qlen(void) { |
| 218 | if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) | 218 | if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) |
| 219 | return 0; | 219 | return 0; |
| 220 | 220 | ||
| @@ -223,7 +223,7 @@ index 57aedb9b93..7ef36d22f5 100644 | |||
| 223 | "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN); | 223 | "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN); |
| 224 | if (r < 0) | 224 | if (r < 0) |
| 225 | return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, | 225 | return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, |
| 226 | @@ -1737,7 +1737,7 @@ static void initialize_core_pattern(bool skip_setup) { | 226 | @@ -1739,7 +1739,7 @@ static void initialize_core_pattern(bool skip_setup) { |
| 227 | if (getpid_cached() != 1) | 227 | if (getpid_cached() != 1) |
| 228 | return; | 228 | return; |
| 229 | 229 | ||
| @@ -285,10 +285,10 @@ index 9fdc74b775..9858a2b415 100644 | |||
| 285 | log_warning_errno(r, "Failed to drop caches, ignoring: %m"); | 285 | log_warning_errno(r, "Failed to drop caches, ignoring: %m"); |
| 286 | else | 286 | else |
| 287 | diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c | 287 | diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c |
| 288 | index b163a0fb6b..fd6c5301d6 100644 | 288 | index 718a92549d..104222bb16 100644 |
| 289 | --- a/src/libsystemd/sd-device/sd-device.c | 289 | --- a/src/libsystemd/sd-device/sd-device.c |
| 290 | +++ b/src/libsystemd/sd-device/sd-device.c | 290 | +++ b/src/libsystemd/sd-device/sd-device.c |
| 291 | @@ -2108,7 +2108,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, | 291 | @@ -2111,7 +2111,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, |
| 292 | if (!value) | 292 | if (!value) |
| 293 | return -ENOMEM; | 293 | return -ENOMEM; |
| 294 | 294 | ||
| @@ -311,10 +311,10 @@ index d472e80c03..c7780c7fc6 100644 | |||
| 311 | log_error_errno(r, "Failed to move process: %m"); | 311 | log_error_errno(r, "Failed to move process: %m"); |
| 312 | goto finish; | 312 | goto finish; |
| 313 | diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c | 313 | diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c |
| 314 | index fb6af295b5..0d83f1e4d2 100644 | 314 | index 573419d7f3..97a81ff8f8 100644 |
| 315 | --- a/src/nspawn/nspawn.c | 315 | --- a/src/nspawn/nspawn.c |
| 316 | +++ b/src/nspawn/nspawn.c | 316 | +++ b/src/nspawn/nspawn.c |
| 317 | @@ -2759,7 +2759,7 @@ static int reset_audit_loginuid(void) { | 317 | @@ -2768,7 +2768,7 @@ static int reset_audit_loginuid(void) { |
| 318 | if (streq(p, "4294967295")) | 318 | if (streq(p, "4294967295")) |
| 319 | return 0; | 319 | return 0; |
| 320 | 320 | ||
| @@ -323,7 +323,7 @@ index fb6af295b5..0d83f1e4d2 100644 | |||
| 323 | if (r < 0) { | 323 | if (r < 0) { |
| 324 | log_error_errno(r, | 324 | log_error_errno(r, |
| 325 | "Failed to reset audit login UID. This probably means that your kernel is too\n" | 325 | "Failed to reset audit login UID. This probably means that your kernel is too\n" |
| 326 | @@ -4175,7 +4175,7 @@ static int setup_uid_map( | 326 | @@ -4184,7 +4184,7 @@ static int setup_uid_map( |
| 327 | return log_oom(); | 327 | return log_oom(); |
| 328 | 328 | ||
| 329 | xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); | 329 | xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); |
| @@ -332,7 +332,7 @@ index fb6af295b5..0d83f1e4d2 100644 | |||
| 332 | if (r < 0) | 332 | if (r < 0) |
| 333 | return log_error_errno(r, "Failed to write UID map: %m"); | 333 | return log_error_errno(r, "Failed to write UID map: %m"); |
| 334 | 334 | ||
| 335 | @@ -4185,7 +4185,7 @@ static int setup_uid_map( | 335 | @@ -4194,7 +4194,7 @@ static int setup_uid_map( |
| 336 | return log_oom(); | 336 | return log_oom(); |
| 337 | 337 | ||
| 338 | xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); | 338 | xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); |
| @@ -441,7 +441,7 @@ index 7064f3a905..8f2a7d9da2 100644 | |||
| 441 | return 0; | 441 | return 0; |
| 442 | log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); | 442 | log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); |
| 443 | diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c | 443 | diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c |
| 444 | index 0089833e3f..0a6a3abbb4 100644 | 444 | index 9d6431d865..c162b6dbfe 100644 |
| 445 | --- a/src/udev/udev-rules.c | 445 | --- a/src/udev/udev-rules.c |
| 446 | +++ b/src/udev/udev-rules.c | 446 | +++ b/src/udev/udev-rules.c |
| 447 | @@ -2181,7 +2181,6 @@ static int udev_rule_apply_token_to_event( | 447 | @@ -2181,7 +2181,6 @@ static int udev_rule_apply_token_to_event( |
diff --git a/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch b/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch index 6981d70af0..33cbb66703 100644 --- a/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch +++ b/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 8871f78c559f37169c0cfaf20b0af1dbec0399af Mon Sep 17 00:00:00 2001 | 1 | From 7a270f66384e95635ac512429b4cd51f817e3494 Mon Sep 17 00:00:00 2001 |
| 2 | From: Scott Murray <scott.murray@konsulko.com> | 2 | From: Scott Murray <scott.murray@konsulko.com> |
| 3 | Date: Fri, 13 Sep 2019 19:26:27 -0400 | 3 | Date: Fri, 13 Sep 2019 19:26:27 -0400 |
| 4 | Subject: [PATCH] Handle __cpu_mask usage | 4 | Subject: [PATCH] Handle __cpu_mask usage |
diff --git a/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch b/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch index 2c56838644..c6982af910 100644 --- a/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch +++ b/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From ec519727bb1ceda6e7787ccf86237a6aad07137c Mon Sep 17 00:00:00 2001 | 1 | From cac47a8efdf76eec005275162fbf28300dffc13c Mon Sep 17 00:00:00 2001 |
| 2 | From: Alex Kiernan <alex.kiernan@gmail.com> | 2 | From: Alex Kiernan <alex.kiernan@gmail.com> |
| 3 | Date: Tue, 10 Mar 2020 11:05:20 +0000 | 3 | Date: Tue, 10 Mar 2020 11:05:20 +0000 |
| 4 | Subject: [PATCH] Handle missing gshadow | 4 | Subject: [PATCH] Handle missing gshadow |
| @@ -139,7 +139,7 @@ index 22ab04d6ee..4e52e7a911 100644 | |||
| 139 | #include <shadow.h> | 139 | #include <shadow.h> |
| 140 | 140 | ||
| 141 | diff --git a/src/shared/userdb.c b/src/shared/userdb.c | 141 | diff --git a/src/shared/userdb.c b/src/shared/userdb.c |
| 142 | index 0eddd382e6..d506b8e263 100644 | 142 | index ec0c835cad..5e4b1028c6 100644 |
| 143 | --- a/src/shared/userdb.c | 143 | --- a/src/shared/userdb.c |
| 144 | +++ b/src/shared/userdb.c | 144 | +++ b/src/shared/userdb.c |
| 145 | @@ -1046,13 +1046,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { | 145 | @@ -1046,13 +1046,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { |
diff --git a/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch b/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch index 6c97a272e2..0845569c91 100644 --- a/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch +++ b/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 754a16eeb255c06dbdd4655632276573f0f075ec Mon Sep 17 00:00:00 2001 | 1 | From bf6d00a780db808de6a5dfc28e24906f699fd60e Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Mon, 12 Apr 2021 23:44:53 -0700 | 3 | Date: Mon, 12 Apr 2021 23:44:53 -0700 |
| 4 | Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl | 4 | Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl |
| @@ -34,7 +34,7 @@ index 793d111c55..9665848b88 100644 | |||
| 34 | #include "missing_keyctl.h" | 34 | #include "missing_keyctl.h" |
| 35 | #include "missing_stat.h" | 35 | #include "missing_stat.h" |
| 36 | diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c | 36 | diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c |
| 37 | index d396bc99fe..7e9c0c3412 100644 | 37 | index fc534435d3..5929ca1fce 100644 |
| 38 | --- a/src/shared/base-filesystem.c | 38 | --- a/src/shared/base-filesystem.c |
| 39 | +++ b/src/shared/base-filesystem.c | 39 | +++ b/src/shared/base-filesystem.c |
| 40 | @@ -19,6 +19,7 @@ | 40 | @@ -19,6 +19,7 @@ |
diff --git a/meta/recipes-core/systemd/systemd/CVE-2022-3821.patch b/meta/recipes-core/systemd/systemd/CVE-2022-3821.patch deleted file mode 100644 index eb8b0cba12..0000000000 --- a/meta/recipes-core/systemd/systemd/CVE-2022-3821.patch +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | From bff52d96598956163d73b7c7bdec7b0ad5b3c2d4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hitendra Prajapati <hprajapati@mvista.com> | ||
| 3 | Date: Tue, 15 Nov 2022 16:52:03 +0530 | ||
| 4 | Subject: [PATCH] CVE-2022-3821 | ||
| 5 | |||
| 6 | Upstream-Status: Backport [https://github.com/systemd/systemd-stable/commit/72d4c15a946d20143cd4c6783c802124bc894dc7] | ||
| 7 | CVE: CVE-2022-3821 | ||
| 8 | Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> | ||
| 9 | --- | ||
| 10 | src/basic/time-util.c | 2 +- | ||
| 11 | src/test/test-time-util.c | 5 +++++ | ||
| 12 | 2 files changed, 6 insertions(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/src/basic/time-util.c b/src/basic/time-util.c | ||
| 15 | index b659d6905d..89dc593d44 100644 | ||
| 16 | --- a/src/basic/time-util.c | ||
| 17 | +++ b/src/basic/time-util.c | ||
| 18 | @@ -588,7 +588,7 @@ char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy) { | ||
| 19 | t = b; | ||
| 20 | } | ||
| 21 | |||
| 22 | - n = MIN((size_t) k, l); | ||
| 23 | + n = MIN((size_t) k, l-1); | ||
| 24 | |||
| 25 | l -= n; | ||
| 26 | p += n; | ||
| 27 | diff --git a/src/test/test-time-util.c b/src/test/test-time-util.c | ||
| 28 | index 4d0131827e..8db6b25279 100644 | ||
| 29 | --- a/src/test/test-time-util.c | ||
| 30 | +++ b/src/test/test-time-util.c | ||
| 31 | @@ -238,6 +238,11 @@ TEST(format_timespan) { | ||
| 32 | test_format_timespan_accuracy(1); | ||
| 33 | test_format_timespan_accuracy(USEC_PER_MSEC); | ||
| 34 | test_format_timespan_accuracy(USEC_PER_SEC); | ||
| 35 | + | ||
| 36 | + /* See issue #23928. */ | ||
| 37 | + _cleanup_free_ char *buf; | ||
| 38 | + assert_se(buf = new(char, 5)); | ||
| 39 | + assert_se(buf == format_timespan(buf, 5, 100005, 1000)); | ||
| 40 | } | ||
| 41 | |||
| 42 | TEST(verify_timezone) { | ||
| 43 | -- | ||
| 44 | 2.25.1 | ||
| 45 | |||
diff --git a/meta/recipes-core/systemd/systemd/CVE-2022-4415-1.patch b/meta/recipes-core/systemd/systemd/CVE-2022-4415-1.patch deleted file mode 100644 index 5cf0fe284e..0000000000 --- a/meta/recipes-core/systemd/systemd/CVE-2022-4415-1.patch +++ /dev/null | |||
| @@ -1,109 +0,0 @@ | |||
| 1 | From 45d323fc889a55fae400a5b08a56273d5724ef4a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> | ||
| 3 | Date: Tue, 29 Nov 2022 09:00:16 +0100 | ||
| 4 | Subject: [PATCH 1/2] coredump: adjust whitespace | ||
| 5 | |||
| 6 | (cherry picked from commit 510a146634f3e095b34e2a26023b1b1f99dcb8c0) | ||
| 7 | (cherry picked from commit cc2eb7a9b5fd6d9dd8ea35fb045ce6e5e16e1187) | ||
| 8 | (cherry picked from commit cb044d734c44cd3c05a6e438b5b995b2a9cfa73c) | ||
| 9 | |||
| 10 | Preparation to avoid conflicts when applying CVE CVE-2022-4415 | ||
| 11 | Upstream-Status: Backport [https://github.com/systemd/systemd-stable/commit/45d323fc889a55fae400a5b08a56273d5724ef4a] | ||
| 12 | |||
| 13 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 14 | --- | ||
| 15 | src/coredump/coredump.c | 56 ++++++++++++++++++++--------------------- | ||
| 16 | 1 file changed, 28 insertions(+), 28 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c | ||
| 19 | index eaea63f682..8295b03ac7 100644 | ||
| 20 | --- a/src/coredump/coredump.c | ||
| 21 | +++ b/src/coredump/coredump.c | ||
| 22 | @@ -103,16 +103,16 @@ enum { | ||
| 23 | }; | ||
| 24 | |||
| 25 | static const char * const meta_field_names[_META_MAX] = { | ||
| 26 | - [META_ARGV_PID] = "COREDUMP_PID=", | ||
| 27 | - [META_ARGV_UID] = "COREDUMP_UID=", | ||
| 28 | - [META_ARGV_GID] = "COREDUMP_GID=", | ||
| 29 | - [META_ARGV_SIGNAL] = "COREDUMP_SIGNAL=", | ||
| 30 | - [META_ARGV_TIMESTAMP] = "COREDUMP_TIMESTAMP=", | ||
| 31 | - [META_ARGV_RLIMIT] = "COREDUMP_RLIMIT=", | ||
| 32 | - [META_ARGV_HOSTNAME] = "COREDUMP_HOSTNAME=", | ||
| 33 | - [META_COMM] = "COREDUMP_COMM=", | ||
| 34 | - [META_EXE] = "COREDUMP_EXE=", | ||
| 35 | - [META_UNIT] = "COREDUMP_UNIT=", | ||
| 36 | + [META_ARGV_PID] = "COREDUMP_PID=", | ||
| 37 | + [META_ARGV_UID] = "COREDUMP_UID=", | ||
| 38 | + [META_ARGV_GID] = "COREDUMP_GID=", | ||
| 39 | + [META_ARGV_SIGNAL] = "COREDUMP_SIGNAL=", | ||
| 40 | + [META_ARGV_TIMESTAMP] = "COREDUMP_TIMESTAMP=", | ||
| 41 | + [META_ARGV_RLIMIT] = "COREDUMP_RLIMIT=", | ||
| 42 | + [META_ARGV_HOSTNAME] = "COREDUMP_HOSTNAME=", | ||
| 43 | + [META_COMM] = "COREDUMP_COMM=", | ||
| 44 | + [META_EXE] = "COREDUMP_EXE=", | ||
| 45 | + [META_UNIT] = "COREDUMP_UNIT=", | ||
| 46 | }; | ||
| 47 | |||
| 48 | typedef struct Context { | ||
| 49 | @@ -131,9 +131,9 @@ typedef enum CoredumpStorage { | ||
| 50 | } CoredumpStorage; | ||
| 51 | |||
| 52 | static const char* const coredump_storage_table[_COREDUMP_STORAGE_MAX] = { | ||
| 53 | - [COREDUMP_STORAGE_NONE] = "none", | ||
| 54 | + [COREDUMP_STORAGE_NONE] = "none", | ||
| 55 | [COREDUMP_STORAGE_EXTERNAL] = "external", | ||
| 56 | - [COREDUMP_STORAGE_JOURNAL] = "journal", | ||
| 57 | + [COREDUMP_STORAGE_JOURNAL] = "journal", | ||
| 58 | }; | ||
| 59 | |||
| 60 | DEFINE_PRIVATE_STRING_TABLE_LOOKUP(coredump_storage, CoredumpStorage); | ||
| 61 | @@ -149,13 +149,13 @@ static uint64_t arg_max_use = UINT64_MAX; | ||
| 62 | |||
| 63 | static int parse_config(void) { | ||
| 64 | static const ConfigTableItem items[] = { | ||
| 65 | - { "Coredump", "Storage", config_parse_coredump_storage, 0, &arg_storage }, | ||
| 66 | - { "Coredump", "Compress", config_parse_bool, 0, &arg_compress }, | ||
| 67 | - { "Coredump", "ProcessSizeMax", config_parse_iec_uint64, 0, &arg_process_size_max }, | ||
| 68 | - { "Coredump", "ExternalSizeMax", config_parse_iec_uint64_infinity, 0, &arg_external_size_max }, | ||
| 69 | - { "Coredump", "JournalSizeMax", config_parse_iec_size, 0, &arg_journal_size_max }, | ||
| 70 | - { "Coredump", "KeepFree", config_parse_iec_uint64, 0, &arg_keep_free }, | ||
| 71 | - { "Coredump", "MaxUse", config_parse_iec_uint64, 0, &arg_max_use }, | ||
| 72 | + { "Coredump", "Storage", config_parse_coredump_storage, 0, &arg_storage }, | ||
| 73 | + { "Coredump", "Compress", config_parse_bool, 0, &arg_compress }, | ||
| 74 | + { "Coredump", "ProcessSizeMax", config_parse_iec_uint64, 0, &arg_process_size_max }, | ||
| 75 | + { "Coredump", "ExternalSizeMax", config_parse_iec_uint64_infinity, 0, &arg_external_size_max }, | ||
| 76 | + { "Coredump", "JournalSizeMax", config_parse_iec_size, 0, &arg_journal_size_max }, | ||
| 77 | + { "Coredump", "KeepFree", config_parse_iec_uint64, 0, &arg_keep_free }, | ||
| 78 | + { "Coredump", "MaxUse", config_parse_iec_uint64, 0, &arg_max_use }, | ||
| 79 | {} | ||
| 80 | }; | ||
| 81 | |||
| 82 | @@ -201,15 +201,15 @@ static int fix_acl(int fd, uid_t uid) { | ||
| 83 | static int fix_xattr(int fd, const Context *context) { | ||
| 84 | |||
| 85 | static const char * const xattrs[_META_MAX] = { | ||
| 86 | - [META_ARGV_PID] = "user.coredump.pid", | ||
| 87 | - [META_ARGV_UID] = "user.coredump.uid", | ||
| 88 | - [META_ARGV_GID] = "user.coredump.gid", | ||
| 89 | - [META_ARGV_SIGNAL] = "user.coredump.signal", | ||
| 90 | - [META_ARGV_TIMESTAMP] = "user.coredump.timestamp", | ||
| 91 | - [META_ARGV_RLIMIT] = "user.coredump.rlimit", | ||
| 92 | - [META_ARGV_HOSTNAME] = "user.coredump.hostname", | ||
| 93 | - [META_COMM] = "user.coredump.comm", | ||
| 94 | - [META_EXE] = "user.coredump.exe", | ||
| 95 | + [META_ARGV_PID] = "user.coredump.pid", | ||
| 96 | + [META_ARGV_UID] = "user.coredump.uid", | ||
| 97 | + [META_ARGV_GID] = "user.coredump.gid", | ||
| 98 | + [META_ARGV_SIGNAL] = "user.coredump.signal", | ||
| 99 | + [META_ARGV_TIMESTAMP] = "user.coredump.timestamp", | ||
| 100 | + [META_ARGV_RLIMIT] = "user.coredump.rlimit", | ||
| 101 | + [META_ARGV_HOSTNAME] = "user.coredump.hostname", | ||
| 102 | + [META_COMM] = "user.coredump.comm", | ||
| 103 | + [META_EXE] = "user.coredump.exe", | ||
| 104 | }; | ||
| 105 | |||
| 106 | int r = 0; | ||
| 107 | -- | ||
| 108 | 2.30.2 | ||
| 109 | |||
diff --git a/meta/recipes-core/systemd/systemd/CVE-2022-4415-2.patch b/meta/recipes-core/systemd/systemd/CVE-2022-4415-2.patch deleted file mode 100644 index 8389ee8cd6..0000000000 --- a/meta/recipes-core/systemd/systemd/CVE-2022-4415-2.patch +++ /dev/null | |||
| @@ -1,391 +0,0 @@ | |||
| 1 | From 1d5e0e9910500f3c3584485f77bfc35e601036e3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> | ||
| 3 | Date: Mon, 28 Nov 2022 12:12:55 +0100 | ||
| 4 | Subject: [PATCH 2/2] coredump: do not allow user to access coredumps with | ||
| 5 | changed uid/gid/capabilities | ||
| 6 | |||
| 7 | When the user starts a program which elevates its permissions via setuid, | ||
| 8 | setgid, or capabilities set on the file, it may access additional information | ||
| 9 | which would then be visible in the coredump. We shouldn't make the the coredump | ||
| 10 | visible to the user in such cases. | ||
| 11 | |||
| 12 | Reported-by: Matthias Gerstner <mgerstner@suse.de> | ||
| 13 | |||
| 14 | This reads the /proc/<pid>/auxv file and attaches it to the process metadata as | ||
| 15 | PROC_AUXV. Before the coredump is submitted, it is parsed and if either | ||
| 16 | at_secure was set (which the kernel will do for processes that are setuid, | ||
| 17 | setgid, or setcap), or if the effective uid/gid don't match uid/gid, the file | ||
| 18 | is not made accessible to the user. If we can't access this data, we assume the | ||
| 19 | file should not be made accessible either. In principle we could also access | ||
| 20 | the auxv data from a note in the core file, but that is much more complex and | ||
| 21 | it seems better to use the stand-alone file that is provided by the kernel. | ||
| 22 | |||
| 23 | Attaching auxv is both convient for this patch (because this way it's passed | ||
| 24 | between the stages along with other fields), but I think it makes sense to save | ||
| 25 | it in general. | ||
| 26 | |||
| 27 | We use the information early in the core file to figure out if the program was | ||
| 28 | 32-bit or 64-bit and its endianness. This way we don't need heuristics to guess | ||
| 29 | whether the format of the auxv structure. This test might reject some cases on | ||
| 30 | fringe architecutes. But the impact would be limited: we just won't grant the | ||
| 31 | user permissions to view the coredump file. If people report that we're missing | ||
| 32 | some cases, we can always enhance this to support more architectures. | ||
| 33 | |||
| 34 | I tested auxv parsing on amd64, 32-bit program on amd64, arm64, arm32, and | ||
| 35 | ppc64el, but not the whole coredump handling. | ||
| 36 | |||
| 37 | (cherry picked from commit 3e4d0f6cf99f8677edd6a237382a65bfe758de03) | ||
| 38 | (cherry picked from commit 9b75a3d0502d6741c8ecb7175794345f8eb3827c) | ||
| 39 | (cherry picked from commit efca5283dc791a07171f80eef84e14fdb58fad57) | ||
| 40 | |||
| 41 | CVE: CVE-2022-4415 | ||
| 42 | Upstream-Status: Backport [https://github.com/systemd/systemd-stable/commit/1d5e0e9910500f3c3584485f77bfc35e601036e3] | ||
| 43 | |||
| 44 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 45 | --- | ||
| 46 | src/basic/io-util.h | 9 ++ | ||
| 47 | src/coredump/coredump.c | 196 +++++++++++++++++++++++++++++++++++++--- | ||
| 48 | 2 files changed, 192 insertions(+), 13 deletions(-) | ||
| 49 | |||
| 50 | diff --git a/src/basic/io-util.h b/src/basic/io-util.h | ||
| 51 | index 39728e06bc..3afb134266 100644 | ||
| 52 | --- a/src/basic/io-util.h | ||
| 53 | +++ b/src/basic/io-util.h | ||
| 54 | @@ -91,7 +91,16 @@ struct iovec_wrapper *iovw_new(void); | ||
| 55 | struct iovec_wrapper *iovw_free(struct iovec_wrapper *iovw); | ||
| 56 | struct iovec_wrapper *iovw_free_free(struct iovec_wrapper *iovw); | ||
| 57 | void iovw_free_contents(struct iovec_wrapper *iovw, bool free_vectors); | ||
| 58 | + | ||
| 59 | int iovw_put(struct iovec_wrapper *iovw, void *data, size_t len); | ||
| 60 | +static inline int iovw_consume(struct iovec_wrapper *iovw, void *data, size_t len) { | ||
| 61 | + /* Move data into iovw or free on error */ | ||
| 62 | + int r = iovw_put(iovw, data, len); | ||
| 63 | + if (r < 0) | ||
| 64 | + free(data); | ||
| 65 | + return r; | ||
| 66 | +} | ||
| 67 | + | ||
| 68 | int iovw_put_string_field(struct iovec_wrapper *iovw, const char *field, const char *value); | ||
| 69 | int iovw_put_string_field_free(struct iovec_wrapper *iovw, const char *field, char *value); | ||
| 70 | void iovw_rebase(struct iovec_wrapper *iovw, char *old, char *new); | ||
| 71 | diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c | ||
| 72 | index 8295b03ac7..79280ab986 100644 | ||
| 73 | --- a/src/coredump/coredump.c | ||
| 74 | +++ b/src/coredump/coredump.c | ||
| 75 | @@ -4,6 +4,7 @@ | ||
| 76 | #include <stdio.h> | ||
| 77 | #include <sys/prctl.h> | ||
| 78 | #include <sys/statvfs.h> | ||
| 79 | +#include <sys/auxv.h> | ||
| 80 | #include <sys/xattr.h> | ||
| 81 | #include <unistd.h> | ||
| 82 | |||
| 83 | @@ -99,6 +100,7 @@ enum { | ||
| 84 | |||
| 85 | META_EXE = _META_MANDATORY_MAX, | ||
| 86 | META_UNIT, | ||
| 87 | + META_PROC_AUXV, | ||
| 88 | _META_MAX | ||
| 89 | }; | ||
| 90 | |||
| 91 | @@ -113,10 +115,12 @@ static const char * const meta_field_names[_META_MAX] = { | ||
| 92 | [META_COMM] = "COREDUMP_COMM=", | ||
| 93 | [META_EXE] = "COREDUMP_EXE=", | ||
| 94 | [META_UNIT] = "COREDUMP_UNIT=", | ||
| 95 | + [META_PROC_AUXV] = "COREDUMP_PROC_AUXV=", | ||
| 96 | }; | ||
| 97 | |||
| 98 | typedef struct Context { | ||
| 99 | const char *meta[_META_MAX]; | ||
| 100 | + size_t meta_size[_META_MAX]; | ||
| 101 | pid_t pid; | ||
| 102 | bool is_pid1; | ||
| 103 | bool is_journald; | ||
| 104 | @@ -178,13 +182,16 @@ static uint64_t storage_size_max(void) { | ||
| 105 | return 0; | ||
| 106 | } | ||
| 107 | |||
| 108 | -static int fix_acl(int fd, uid_t uid) { | ||
| 109 | +static int fix_acl(int fd, uid_t uid, bool allow_user) { | ||
| 110 | + assert(fd >= 0); | ||
| 111 | + assert(uid_is_valid(uid)); | ||
| 112 | |||
| 113 | #if HAVE_ACL | ||
| 114 | int r; | ||
| 115 | |||
| 116 | - assert(fd >= 0); | ||
| 117 | - assert(uid_is_valid(uid)); | ||
| 118 | + /* We don't allow users to read coredumps if the uid or capabilities were changed. */ | ||
| 119 | + if (!allow_user) | ||
| 120 | + return 0; | ||
| 121 | |||
| 122 | if (uid_is_system(uid) || uid_is_dynamic(uid) || uid == UID_NOBODY) | ||
| 123 | return 0; | ||
| 124 | @@ -244,7 +251,8 @@ static int fix_permissions( | ||
| 125 | const char *filename, | ||
| 126 | const char *target, | ||
| 127 | const Context *context, | ||
| 128 | - uid_t uid) { | ||
| 129 | + uid_t uid, | ||
| 130 | + bool allow_user) { | ||
| 131 | |||
| 132 | int r; | ||
| 133 | |||
| 134 | @@ -254,7 +262,7 @@ static int fix_permissions( | ||
| 135 | |||
| 136 | /* Ignore errors on these */ | ||
| 137 | (void) fchmod(fd, 0640); | ||
| 138 | - (void) fix_acl(fd, uid); | ||
| 139 | + (void) fix_acl(fd, uid, allow_user); | ||
| 140 | (void) fix_xattr(fd, context); | ||
| 141 | |||
| 142 | r = fsync_full(fd); | ||
| 143 | @@ -324,6 +332,153 @@ static int make_filename(const Context *context, char **ret) { | ||
| 144 | return 0; | ||
| 145 | } | ||
| 146 | |||
| 147 | +static int parse_auxv64( | ||
| 148 | + const uint64_t *auxv, | ||
| 149 | + size_t size_bytes, | ||
| 150 | + int *at_secure, | ||
| 151 | + uid_t *uid, | ||
| 152 | + uid_t *euid, | ||
| 153 | + gid_t *gid, | ||
| 154 | + gid_t *egid) { | ||
| 155 | + | ||
| 156 | + assert(auxv || size_bytes == 0); | ||
| 157 | + | ||
| 158 | + if (size_bytes % (2 * sizeof(uint64_t)) != 0) | ||
| 159 | + return log_warning_errno(SYNTHETIC_ERRNO(EIO), "Incomplete auxv structure (%zu bytes).", size_bytes); | ||
| 160 | + | ||
| 161 | + size_t words = size_bytes / sizeof(uint64_t); | ||
| 162 | + | ||
| 163 | + /* Note that we set output variables even on error. */ | ||
| 164 | + | ||
| 165 | + for (size_t i = 0; i + 1 < words; i += 2) | ||
| 166 | + switch (auxv[i]) { | ||
| 167 | + case AT_SECURE: | ||
| 168 | + *at_secure = auxv[i + 1] != 0; | ||
| 169 | + break; | ||
| 170 | + case AT_UID: | ||
| 171 | + *uid = auxv[i + 1]; | ||
| 172 | + break; | ||
| 173 | + case AT_EUID: | ||
| 174 | + *euid = auxv[i + 1]; | ||
| 175 | + break; | ||
| 176 | + case AT_GID: | ||
| 177 | + *gid = auxv[i + 1]; | ||
| 178 | + break; | ||
| 179 | + case AT_EGID: | ||
| 180 | + *egid = auxv[i + 1]; | ||
| 181 | + break; | ||
| 182 | + case AT_NULL: | ||
| 183 | + if (auxv[i + 1] != 0) | ||
| 184 | + goto error; | ||
| 185 | + return 0; | ||
| 186 | + } | ||
| 187 | + error: | ||
| 188 | + return log_warning_errno(SYNTHETIC_ERRNO(ENODATA), | ||
| 189 | + "AT_NULL terminator not found, cannot parse auxv structure."); | ||
| 190 | +} | ||
| 191 | + | ||
| 192 | +static int parse_auxv32( | ||
| 193 | + const uint32_t *auxv, | ||
| 194 | + size_t size_bytes, | ||
| 195 | + int *at_secure, | ||
| 196 | + uid_t *uid, | ||
| 197 | + uid_t *euid, | ||
| 198 | + gid_t *gid, | ||
| 199 | + gid_t *egid) { | ||
| 200 | + | ||
| 201 | + assert(auxv || size_bytes == 0); | ||
| 202 | + | ||
| 203 | + size_t words = size_bytes / sizeof(uint32_t); | ||
| 204 | + | ||
| 205 | + if (size_bytes % (2 * sizeof(uint32_t)) != 0) | ||
| 206 | + return log_warning_errno(SYNTHETIC_ERRNO(EIO), "Incomplete auxv structure (%zu bytes).", size_bytes); | ||
| 207 | + | ||
| 208 | + /* Note that we set output variables even on error. */ | ||
| 209 | + | ||
| 210 | + for (size_t i = 0; i + 1 < words; i += 2) | ||
| 211 | + switch (auxv[i]) { | ||
| 212 | + case AT_SECURE: | ||
| 213 | + *at_secure = auxv[i + 1] != 0; | ||
| 214 | + break; | ||
| 215 | + case AT_UID: | ||
| 216 | + *uid = auxv[i + 1]; | ||
| 217 | + break; | ||
| 218 | + case AT_EUID: | ||
| 219 | + *euid = auxv[i + 1]; | ||
| 220 | + break; | ||
| 221 | + case AT_GID: | ||
| 222 | + *gid = auxv[i + 1]; | ||
| 223 | + break; | ||
| 224 | + case AT_EGID: | ||
| 225 | + *egid = auxv[i + 1]; | ||
| 226 | + break; | ||
| 227 | + case AT_NULL: | ||
| 228 | + if (auxv[i + 1] != 0) | ||
| 229 | + goto error; | ||
| 230 | + return 0; | ||
| 231 | + } | ||
| 232 | + error: | ||
| 233 | + return log_warning_errno(SYNTHETIC_ERRNO(ENODATA), | ||
| 234 | + "AT_NULL terminator not found, cannot parse auxv structure."); | ||
| 235 | +} | ||
| 236 | + | ||
| 237 | +static int grant_user_access(int core_fd, const Context *context) { | ||
| 238 | + int at_secure = -1; | ||
| 239 | + uid_t uid = UID_INVALID, euid = UID_INVALID; | ||
| 240 | + uid_t gid = GID_INVALID, egid = GID_INVALID; | ||
| 241 | + int r; | ||
| 242 | + | ||
| 243 | + assert(core_fd >= 0); | ||
| 244 | + assert(context); | ||
| 245 | + | ||
| 246 | + if (!context->meta[META_PROC_AUXV]) | ||
| 247 | + return log_warning_errno(SYNTHETIC_ERRNO(ENODATA), "No auxv data, not adjusting permissions."); | ||
| 248 | + | ||
| 249 | + uint8_t elf[EI_NIDENT]; | ||
| 250 | + errno = 0; | ||
| 251 | + if (pread(core_fd, &elf, sizeof(elf), 0) != sizeof(elf)) | ||
| 252 | + return log_warning_errno(errno_or_else(EIO), | ||
| 253 | + "Failed to pread from coredump fd: %s", errno != 0 ? strerror_safe(errno) : "Unexpected EOF"); | ||
| 254 | + | ||
| 255 | + if (elf[EI_MAG0] != ELFMAG0 || | ||
| 256 | + elf[EI_MAG1] != ELFMAG1 || | ||
| 257 | + elf[EI_MAG2] != ELFMAG2 || | ||
| 258 | + elf[EI_MAG3] != ELFMAG3 || | ||
| 259 | + elf[EI_VERSION] != EV_CURRENT) | ||
| 260 | + return log_info_errno(SYNTHETIC_ERRNO(EUCLEAN), | ||
| 261 | + "Core file does not have ELF header, not adjusting permissions."); | ||
| 262 | + if (!IN_SET(elf[EI_CLASS], ELFCLASS32, ELFCLASS64) || | ||
| 263 | + !IN_SET(elf[EI_DATA], ELFDATA2LSB, ELFDATA2MSB)) | ||
| 264 | + return log_info_errno(SYNTHETIC_ERRNO(EUCLEAN), | ||
| 265 | + "Core file has strange ELF class, not adjusting permissions."); | ||
| 266 | + | ||
| 267 | + if ((elf[EI_DATA] == ELFDATA2LSB) != (__BYTE_ORDER == __LITTLE_ENDIAN)) | ||
| 268 | + return log_info_errno(SYNTHETIC_ERRNO(EUCLEAN), | ||
| 269 | + "Core file has non-native endianness, not adjusting permissions."); | ||
| 270 | + | ||
| 271 | + if (elf[EI_CLASS] == ELFCLASS64) | ||
| 272 | + r = parse_auxv64((const uint64_t*) context->meta[META_PROC_AUXV], | ||
| 273 | + context->meta_size[META_PROC_AUXV], | ||
| 274 | + &at_secure, &uid, &euid, &gid, &egid); | ||
| 275 | + else | ||
| 276 | + r = parse_auxv32((const uint32_t*) context->meta[META_PROC_AUXV], | ||
| 277 | + context->meta_size[META_PROC_AUXV], | ||
| 278 | + &at_secure, &uid, &euid, &gid, &egid); | ||
| 279 | + if (r < 0) | ||
| 280 | + return r; | ||
| 281 | + | ||
| 282 | + /* We allow access if we got all the data and at_secure is not set and | ||
| 283 | + * the uid/gid matches euid/egid. */ | ||
| 284 | + bool ret = | ||
| 285 | + at_secure == 0 && | ||
| 286 | + uid != UID_INVALID && euid != UID_INVALID && uid == euid && | ||
| 287 | + gid != GID_INVALID && egid != GID_INVALID && gid == egid; | ||
| 288 | + log_debug("Will %s access (uid="UID_FMT " euid="UID_FMT " gid="GID_FMT " egid="GID_FMT " at_secure=%s)", | ||
| 289 | + ret ? "permit" : "restrict", | ||
| 290 | + uid, euid, gid, egid, yes_no(at_secure)); | ||
| 291 | + return ret; | ||
| 292 | +} | ||
| 293 | + | ||
| 294 | static int save_external_coredump( | ||
| 295 | const Context *context, | ||
| 296 | int input_fd, | ||
| 297 | @@ -446,6 +601,8 @@ static int save_external_coredump( | ||
| 298 | context->meta[META_ARGV_PID], context->meta[META_COMM]); | ||
| 299 | truncated = r == 1; | ||
| 300 | |||
| 301 | + bool allow_user = grant_user_access(fd, context) > 0; | ||
| 302 | + | ||
| 303 | #if HAVE_COMPRESSION | ||
| 304 | if (arg_compress) { | ||
| 305 | _cleanup_(unlink_and_freep) char *tmp_compressed = NULL; | ||
| 306 | @@ -483,7 +640,7 @@ static int save_external_coredump( | ||
| 307 | uncompressed_size += partial_uncompressed_size; | ||
| 308 | } | ||
| 309 | |||
| 310 | - r = fix_permissions(fd_compressed, tmp_compressed, fn_compressed, context, uid); | ||
| 311 | + r = fix_permissions(fd_compressed, tmp_compressed, fn_compressed, context, uid, allow_user); | ||
| 312 | if (r < 0) | ||
| 313 | return r; | ||
| 314 | |||
| 315 | @@ -510,7 +667,7 @@ static int save_external_coredump( | ||
| 316 | "SIZE_LIMIT=%zu", max_size, | ||
| 317 | "MESSAGE_ID=" SD_MESSAGE_TRUNCATED_CORE_STR); | ||
| 318 | |||
| 319 | - r = fix_permissions(fd, tmp, fn, context, uid); | ||
| 320 | + r = fix_permissions(fd, tmp, fn, context, uid, allow_user); | ||
| 321 | if (r < 0) | ||
| 322 | return log_error_errno(r, "Failed to fix permissions and finalize coredump %s into %s: %m", coredump_tmpfile_name(tmp), fn); | ||
| 323 | |||
| 324 | @@ -758,7 +915,7 @@ static int change_uid_gid(const Context *context) { | ||
| 325 | } | ||
| 326 | |||
| 327 | static int submit_coredump( | ||
| 328 | - Context *context, | ||
| 329 | + const Context *context, | ||
| 330 | struct iovec_wrapper *iovw, | ||
| 331 | int input_fd) { | ||
| 332 | |||
| 333 | @@ -919,16 +1076,15 @@ static int save_context(Context *context, const struct iovec_wrapper *iovw) { | ||
| 334 | struct iovec *iovec = iovw->iovec + n; | ||
| 335 | |||
| 336 | for (size_t i = 0; i < ELEMENTSOF(meta_field_names); i++) { | ||
| 337 | - char *p; | ||
| 338 | - | ||
| 339 | /* Note that these strings are NUL terminated, because we made sure that a | ||
| 340 | * trailing NUL byte is in the buffer, though not included in the iov_len | ||
| 341 | * count (see process_socket() and gather_pid_metadata_*()) */ | ||
| 342 | assert(((char*) iovec->iov_base)[iovec->iov_len] == 0); | ||
| 343 | |||
| 344 | - p = startswith(iovec->iov_base, meta_field_names[i]); | ||
| 345 | + const char *p = startswith(iovec->iov_base, meta_field_names[i]); | ||
| 346 | if (p) { | ||
| 347 | context->meta[i] = p; | ||
| 348 | + context->meta_size[i] = iovec->iov_len - strlen(meta_field_names[i]); | ||
| 349 | count++; | ||
| 350 | break; | ||
| 351 | } | ||
| 352 | @@ -1170,6 +1326,7 @@ static int gather_pid_metadata(struct iovec_wrapper *iovw, Context *context) { | ||
| 353 | uid_t owner_uid; | ||
| 354 | pid_t pid; | ||
| 355 | char *t; | ||
| 356 | + size_t size; | ||
| 357 | const char *p; | ||
| 358 | int r; | ||
| 359 | |||
| 360 | @@ -1234,13 +1391,26 @@ static int gather_pid_metadata(struct iovec_wrapper *iovw, Context *context) { | ||
| 361 | (void) iovw_put_string_field_free(iovw, "COREDUMP_PROC_LIMITS=", t); | ||
| 362 | |||
| 363 | p = procfs_file_alloca(pid, "cgroup"); | ||
| 364 | - if (read_full_virtual_file(p, &t, NULL) >=0) | ||
| 365 | + if (read_full_virtual_file(p, &t, NULL) >= 0) | ||
| 366 | (void) iovw_put_string_field_free(iovw, "COREDUMP_PROC_CGROUP=", t); | ||
| 367 | |||
| 368 | p = procfs_file_alloca(pid, "mountinfo"); | ||
| 369 | - if (read_full_virtual_file(p, &t, NULL) >=0) | ||
| 370 | + if (read_full_virtual_file(p, &t, NULL) >= 0) | ||
| 371 | (void) iovw_put_string_field_free(iovw, "COREDUMP_PROC_MOUNTINFO=", t); | ||
| 372 | |||
| 373 | + /* We attach /proc/auxv here. ELF coredumps also contain a note for this (NT_AUXV), see elf(5). */ | ||
| 374 | + p = procfs_file_alloca(pid, "auxv"); | ||
| 375 | + if (read_full_virtual_file(p, &t, &size) >= 0) { | ||
| 376 | + char *buf = malloc(strlen("COREDUMP_PROC_AUXV=") + size + 1); | ||
| 377 | + if (buf) { | ||
| 378 | + /* Add a dummy terminator to make save_context() happy. */ | ||
| 379 | + *((uint8_t*) mempcpy(stpcpy(buf, "COREDUMP_PROC_AUXV="), t, size)) = '\0'; | ||
| 380 | + (void) iovw_consume(iovw, buf, size + strlen("COREDUMP_PROC_AUXV=")); | ||
| 381 | + } | ||
| 382 | + | ||
| 383 | + free(t); | ||
| 384 | + } | ||
| 385 | + | ||
| 386 | if (get_process_cwd(pid, &t) >= 0) | ||
| 387 | (void) iovw_put_string_field_free(iovw, "COREDUMP_CWD=", t); | ||
| 388 | |||
| 389 | -- | ||
| 390 | 2.30.2 | ||
| 391 | |||
diff --git a/meta/recipes-core/systemd/systemd/CVE-2022-45873.patch b/meta/recipes-core/systemd/systemd/CVE-2022-45873.patch deleted file mode 100644 index 94bd22ca43..0000000000 --- a/meta/recipes-core/systemd/systemd/CVE-2022-45873.patch +++ /dev/null | |||
| @@ -1,124 +0,0 @@ | |||
| 1 | From 076b807be472630692c5348c60d0c2b7b28ad437 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> | ||
| 3 | Date: Tue, 18 Oct 2022 18:23:53 +0200 | ||
| 4 | Subject: [PATCH] coredump: avoid deadlock when passing processed backtrace | ||
| 5 | data | ||
| 6 | |||
| 7 | We would deadlock when passing the data back from the forked-off process that | ||
| 8 | was doing backtrace generation back to the coredump parent. This is because we | ||
| 9 | fork the child and wait for it to exit. The child tries to write too much data | ||
| 10 | to the output pipe, and and after the first 64k blocks on the parent because | ||
| 11 | the pipe is full. The bug surfaced in Fedora because of a combination of four | ||
| 12 | factors: | ||
| 13 | - 87707784c70dc9894ec613df0a6e75e732a362a3 was backported to v251.5, which | ||
| 14 | allowed coredump processing to be successful. | ||
| 15 | - 1a0281a3ebf4f8c16d40aa9e63103f16cd23bb2a was NOT backported, so the output | ||
| 16 | was very verbose. | ||
| 17 | - Fedora has the ELF package metadata available, so a lot of output can be | ||
| 18 | generated. Most other distros just don't have the information. | ||
| 19 | - gnome-calendar crashes and has a bazillion modules and 69596 bytes of output | ||
| 20 | are generated for it. | ||
| 21 | |||
| 22 | Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2135778. | ||
| 23 | |||
| 24 | The code is changed to try to write data opportunistically. If we get partial | ||
| 25 | information, that is still logged. In is generally better to log partial | ||
| 26 | backtrace information than nothing at all. | ||
| 27 | |||
| 28 | Upstream-Status: Backport [https://github.com/systemd/systemd/commit/076b807be472630692c5348c60d0c2b7b28ad437] | ||
| 29 | CVE: CVE-2022-45873 | ||
| 30 | Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> | ||
| 31 | --- | ||
| 32 | src/shared/elf-util.c | 37 +++++++++++++++++++++++++++++++------ | ||
| 33 | 1 file changed, 31 insertions(+), 6 deletions(-) | ||
| 34 | |||
| 35 | diff --git a/src/shared/elf-util.c b/src/shared/elf-util.c | ||
| 36 | index 6d9fcfbbf2..bd27507346 100644 | ||
| 37 | --- a/src/shared/elf-util.c | ||
| 38 | +++ b/src/shared/elf-util.c | ||
| 39 | @@ -30,6 +30,9 @@ | ||
| 40 | #define THREADS_MAX 64 | ||
| 41 | #define ELF_PACKAGE_METADATA_ID 0xcafe1a7e | ||
| 42 | |||
| 43 | +/* The amount of data we're willing to write to each of the output pipes. */ | ||
| 44 | +#define COREDUMP_PIPE_MAX (1024*1024U) | ||
| 45 | + | ||
| 46 | static void *dw_dl = NULL; | ||
| 47 | static void *elf_dl = NULL; | ||
| 48 | |||
| 49 | @@ -700,13 +703,13 @@ int parse_elf_object(int fd, const char *executable, bool fork_disable_dump, cha | ||
| 50 | return r; | ||
| 51 | |||
| 52 | if (ret) { | ||
| 53 | - r = RET_NERRNO(pipe2(return_pipe, O_CLOEXEC)); | ||
| 54 | + r = RET_NERRNO(pipe2(return_pipe, O_CLOEXEC|O_NONBLOCK)); | ||
| 55 | if (r < 0) | ||
| 56 | return r; | ||
| 57 | } | ||
| 58 | |||
| 59 | if (ret_package_metadata) { | ||
| 60 | - r = RET_NERRNO(pipe2(json_pipe, O_CLOEXEC)); | ||
| 61 | + r = RET_NERRNO(pipe2(json_pipe, O_CLOEXEC|O_NONBLOCK)); | ||
| 62 | if (r < 0) | ||
| 63 | return r; | ||
| 64 | } | ||
| 65 | @@ -750,8 +753,24 @@ int parse_elf_object(int fd, const char *executable, bool fork_disable_dump, cha | ||
| 66 | goto child_fail; | ||
| 67 | |||
| 68 | if (buf) { | ||
| 69 | - r = loop_write(return_pipe[1], buf, strlen(buf), false); | ||
| 70 | - if (r < 0) | ||
| 71 | + size_t len = strlen(buf); | ||
| 72 | + | ||
| 73 | + if (len > COREDUMP_PIPE_MAX) { | ||
| 74 | + /* This is iffy. A backtrace can be a few hundred kilobytes, but too much is | ||
| 75 | + * too much. Let's log a warning and ignore the rest. */ | ||
| 76 | + log_warning("Generated backtrace is %zu bytes (more than the limit of %u bytes), backtrace will be truncated.", | ||
| 77 | + len, COREDUMP_PIPE_MAX); | ||
| 78 | + len = COREDUMP_PIPE_MAX; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + /* Bump the space for the returned string. | ||
| 82 | + * Failure is ignored, because partial output is still useful. */ | ||
| 83 | + (void) fcntl(return_pipe[1], F_SETPIPE_SZ, len); | ||
| 84 | + | ||
| 85 | + r = loop_write(return_pipe[1], buf, len, false); | ||
| 86 | + if (r == -EAGAIN) | ||
| 87 | + log_warning("Write failed, backtrace will be truncated."); | ||
| 88 | + else if (r < 0) | ||
| 89 | goto child_fail; | ||
| 90 | |||
| 91 | return_pipe[1] = safe_close(return_pipe[1]); | ||
| 92 | @@ -760,13 +779,19 @@ int parse_elf_object(int fd, const char *executable, bool fork_disable_dump, cha | ||
| 93 | if (package_metadata) { | ||
| 94 | _cleanup_fclose_ FILE *json_out = NULL; | ||
| 95 | |||
| 96 | + /* Bump the space for the returned string. We don't know how much space we'll need in | ||
| 97 | + * advance, so we'll just try to write as much as possible and maybe fail later. */ | ||
| 98 | + (void) fcntl(json_pipe[1], F_SETPIPE_SZ, COREDUMP_PIPE_MAX); | ||
| 99 | + | ||
| 100 | json_out = take_fdopen(&json_pipe[1], "w"); | ||
| 101 | if (!json_out) { | ||
| 102 | r = -errno; | ||
| 103 | goto child_fail; | ||
| 104 | } | ||
| 105 | |||
| 106 | - json_variant_dump(package_metadata, JSON_FORMAT_FLUSH, json_out, NULL); | ||
| 107 | + r = json_variant_dump(package_metadata, JSON_FORMAT_FLUSH, json_out, NULL); | ||
| 108 | + if (r < 0) | ||
| 109 | + log_warning_errno(r, "Failed to write JSON package metadata, ignoring: %m"); | ||
| 110 | } | ||
| 111 | |||
| 112 | _exit(EXIT_SUCCESS); | ||
| 113 | @@ -801,7 +826,7 @@ int parse_elf_object(int fd, const char *executable, bool fork_disable_dump, cha | ||
| 114 | |||
| 115 | r = json_parse_file(json_in, NULL, 0, &package_metadata, NULL, NULL); | ||
| 116 | if (r < 0 && r != -EINVAL) /* EINVAL: json was empty, so we got nothing, but that's ok */ | ||
| 117 | - return r; | ||
| 118 | + log_warning_errno(r, "Failed to read or parse json metadata, ignoring: %m"); | ||
| 119 | } | ||
| 120 | |||
| 121 | if (ret) | ||
| 122 | -- | ||
| 123 | 2.25.1 | ||
| 124 | |||
diff --git a/meta/recipes-core/systemd/systemd/CVE-2023-7008.patch b/meta/recipes-core/systemd/systemd/CVE-2023-7008.patch deleted file mode 100644 index e2296abc49..0000000000 --- a/meta/recipes-core/systemd/systemd/CVE-2023-7008.patch +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | From 3b4cc1437b51fcc0b08da8cc3f5d1175eed25eb1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Michal Sekletar <msekleta@redhat.com> | ||
| 3 | Date: Wed, 20 Dec 2023 16:44:14 +0100 | ||
| 4 | Subject: [PATCH] resolved: actually check authenticated flag of SOA | ||
| 5 | transaction | ||
| 6 | |||
| 7 | Fixes #25676 | ||
| 8 | |||
| 9 | Upstream-Status: Backport [https://github.com/systemd/systemd/commit/3b4cc1437b51fcc0b08da8cc3f5d1175eed25eb1] | ||
| 10 | CVE: CVE-2023-7008 | ||
| 11 | Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> | ||
| 12 | --- | ||
| 13 | src/resolve/resolved-dns-transaction.c | 4 ++-- | ||
| 14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c | ||
| 17 | index f937f9f7b5..7deb598400 100644 | ||
| 18 | --- a/src/resolve/resolved-dns-transaction.c | ||
| 19 | +++ b/src/resolve/resolved-dns-transaction.c | ||
| 20 | @@ -2761,7 +2761,7 @@ static int dns_transaction_requires_rrsig(DnsTransaction *t, DnsResourceRecord * | ||
| 21 | if (r == 0) | ||
| 22 | continue; | ||
| 23 | |||
| 24 | - return FLAGS_SET(t->answer_query_flags, SD_RESOLVED_AUTHENTICATED); | ||
| 25 | + return FLAGS_SET(dt->answer_query_flags, SD_RESOLVED_AUTHENTICATED); | ||
| 26 | } | ||
| 27 | |||
| 28 | return true; | ||
| 29 | @@ -2788,7 +2788,7 @@ static int dns_transaction_requires_rrsig(DnsTransaction *t, DnsResourceRecord * | ||
| 30 | /* We found the transaction that was supposed to find the SOA RR for us. It was | ||
| 31 | * successful, but found no RR for us. This means we are not at a zone cut. In this | ||
| 32 | * case, we require authentication if the SOA lookup was authenticated too. */ | ||
| 33 | - return FLAGS_SET(t->answer_query_flags, SD_RESOLVED_AUTHENTICATED); | ||
| 34 | + return FLAGS_SET(dt->answer_query_flags, SD_RESOLVED_AUTHENTICATED); | ||
| 35 | } | ||
| 36 | |||
| 37 | return true; | ||
| 38 | -- | ||
| 39 | 2.25.1 | ||
| 40 | |||
diff --git a/meta/recipes-core/systemd/systemd_250.5.bb b/meta/recipes-core/systemd/systemd_250.14.bb index 4d520c85f3..ef0476fad9 100644 --- a/meta/recipes-core/systemd/systemd_250.5.bb +++ b/meta/recipes-core/systemd/systemd_250.14.bb | |||
| @@ -25,15 +25,10 @@ SRC_URI += "file://touchscreen.rules \ | |||
| 25 | file://0003-implment-systemd-sysv-install-for-OE.patch \ | 25 | file://0003-implment-systemd-sysv-install-for-OE.patch \ |
| 26 | file://0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch \ | 26 | file://0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch \ |
| 27 | file://0001-resolve-Use-sockaddr-pointer-type-for-bind.patch \ | 27 | file://0001-resolve-Use-sockaddr-pointer-type-for-bind.patch \ |
| 28 | file://CVE-2022-3821.patch \ | ||
| 29 | file://CVE-2022-45873.patch \ | ||
| 30 | file://0001-shared-json-allow-json_variant_dump-to-return-an-err.patch \ | ||
| 31 | file://CVE-2022-4415-1.patch \ | ||
| 32 | file://CVE-2022-4415-2.patch \ | ||
| 33 | file://0001-network-remove-only-managed-configs-on-reconfigure-o.patch \ | 28 | file://0001-network-remove-only-managed-configs-on-reconfigure-o.patch \ |
| 34 | file://0001-nspawn-make-sure-host-root-can-write-to-the-uidmappe.patch \ | 29 | file://0001-nspawn-make-sure-host-root-can-write-to-the-uidmappe.patch \ |
| 35 | file://CVE-2023-7008.patch \ | ||
| 36 | file://fix-vlan-qos-mapping.patch \ | 30 | file://fix-vlan-qos-mapping.patch \ |
| 31 | file://0001-core-fix-build-when-seccomp-is-off.patch \ | ||
| 37 | " | 32 | " |
| 38 | 33 | ||
| 39 | # patches needed by musl | 34 | # patches needed by musl |
