sync patches from systemd community

This commit is contained in:
hanjinpeng 2024-05-08 16:58:23 +08:00
parent da34860a97
commit 50b07322ee
4 changed files with 81 additions and 1 deletions

View File

@ -0,0 +1,23 @@
From 4dc646fa1ae83c570801a22d256e39eb3508a17b Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Tue, 30 Jan 2024 11:59:54 +0100
Subject: [PATCH] conf-parser: fix OOM check
(cherry picked from commit 0fa25bd5f4789e8b37be5dd7927bab81c18c2dcd)
---
src/shared/conf-parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index 59a529d4bcb..e8ecd9bc794 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -466,7 +466,7 @@ int hashmap_put_stats_by_path(Hashmap **stats_by_path, const char *path, const s
return -ENOMEM;
path_copy = strdup(path);
- if (!path)
+ if (!path_copy)
return -ENOMEM;
r = hashmap_put(*stats_by_path, path_copy, st_copy);

View File

@ -0,0 +1,23 @@
From 5df96d470fea91b29279e3ae7ff31deff907f751 Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Tue, 12 Mar 2024 15:22:43 +0100
Subject: [PATCH] homed: fix typo
(cherry picked from commit d3d880e558e608de351c0b518c10953cba2ed0b3)
---
src/home/homed-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/home/homed-manager.c b/src/home/homed-manager.c
index c4525310fc2..b8bef53db52 100644
--- a/src/home/homed-manager.c
+++ b/src/home/homed-manager.c
@@ -1040,7 +1040,7 @@ static int manager_bind_varlink(Manager *m) {
assert(!m->userdb_service);
r = path_extract_filename(socket_path, &m->userdb_service);
if (r < 0)
- return log_error_errno(r, "Failed to extra filename from socket path '%s': %m", socket_path);
+ return log_error_errno(r, "Failed to extract filename from socket path '%s': %m", socket_path);
/* Avoid recursion */
if (setenv("SYSTEMD_BYPASS_USERDB", m->userdb_service, 1) < 0)

View File

@ -0,0 +1,25 @@
From 891be0c2e7da8d95217e25e91cf1216b46be73fd Mon Sep 17 00:00:00 2001
From: Mike Yuan <me@yhndnzj.com>
Date: Wed, 17 Jan 2024 17:20:29 +0800
Subject: [PATCH] core/unit: check for correct function in vtable
Prompted by https://github.com/systemd/systemd/pull/30974/commits/61e44e01325eca50e88fc9cd400ee340081e9134
(cherry picked from commit 18cf8411b712e7264c56d80369c8945491af90ee)
---
src/core/unit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/unit.c b/src/core/unit.c
index 41f3bdb226a..2fc9f5ad2d3 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -6605,7 +6605,7 @@ int activation_details_append_pair(ActivationDetails *details, char ***strv) {
return r;
}
- if (ACTIVATION_DETAILS_VTABLE(details)->append_env) {
+ if (ACTIVATION_DETAILS_VTABLE(details)->append_pair) {
r = ACTIVATION_DETAILS_VTABLE(details)->append_pair(details, strv);
if (r < 0)
return r;

View File

@ -25,7 +25,7 @@
Name: systemd
Url: https://systemd.io/
Version: 255
Release: 13
Release: 14
License: MIT and LGPLv2+ and GPLv2+
Summary: System and Service Manager
@ -61,6 +61,9 @@ Patch6007: backport-fix-analyze-q-option-invalid-issue.patch
Patch6008: backport-allow-override-default-log-level-by-environment-variable.patch
Patch6009: backport-login-user-runtime-dir-properly-check-for-mount-poin.patch
Patch6010: backport-user-util-validate-the-right-field.patch
Patch6011: backport-fix-conf-parser-oom-check-issue.patch
Patch6012: backport-unit-check-for-correct-function-in-vtable.patch
Patch6013: backport-fix-homed-log-message-typo-error.patch
Patch9008: update-rtc-with-system-clock-when-shutdown.patch
Patch9009: udev-add-actions-while-rename-netif-failed.patch
@ -1640,6 +1643,12 @@ fi
%{_libdir}/security/pam_systemd_loadkey.so
%changelog
* Wed May 8 2024 Han Jinpeng <hanjinpeng@kylinos.cn> - 255-14
- backport: sync patches from systemd community
add backport-fix-conf-parser-oom-check-issue.patch
backport-unit-check-for-correct-function-in-vtable.patch
backport-fix-homed-log-message-typo-error.patch
* Mon Apr 29 2024 huyubiao <huyubiao@huawei.com> - 255-13
- add backport-login-user-runtime-dir-properly-check-for-mount-poin.patch
backport-user-util-validate-the-right-field.patch