!641 同步上游社区补丁
From: @huyubiao Reviewed-by: @licunlong Signed-off-by: @licunlong
This commit is contained in:
commit
4cfc514b17
@ -0,0 +1,32 @@
|
||||
From 4c3e455c093c274e3ccbc4662e47a72c3f43a34d Mon Sep 17 00:00:00 2001
|
||||
From: Mike Yuan <me@yhndnzj.com>
|
||||
Date: Mon, 5 Feb 2024 04:53:14 +0800
|
||||
Subject: [PATCH] login/user-runtime-dir: properly check for mount point
|
||||
|
||||
(cherry picked from commit 561d8793058bba886d71f96fa157ca77cd6b5c23)
|
||||
(cherry picked from commit 0ec2d29241b9d5d77630ba5ad7fa1cf4f632e1f6)
|
||||
(cherry picked from commit ad9eafcc8264976b762efe4d0ce70f924d2be0bc)
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/systemd/systemd-stable/commit/4c3e455c093c274e3ccbc4662e47a72c3f43a34d
|
||||
|
||||
---
|
||||
src/login/user-runtime-dir.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/login/user-runtime-dir.c b/src/login/user-runtime-dir.c
|
||||
index f96a2d8662..c74d8b8d0e 100644
|
||||
--- a/src/login/user-runtime-dir.c
|
||||
+++ b/src/login/user-runtime-dir.c
|
||||
@@ -66,7 +66,7 @@ static int user_mkdir_runtime_path(
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to create /run/user: %m");
|
||||
|
||||
- if (path_is_mount_point(runtime_path, NULL, 0) >= 0)
|
||||
+ if (path_is_mount_point(runtime_path, NULL, 0) > 0)
|
||||
log_debug("%s is already a mount point", runtime_path);
|
||||
else {
|
||||
char options[sizeof("mode=0700,uid=,gid=,size=,smackfsroot=*")
|
||||
--
|
||||
2.33.0
|
||||
|
||||
32
backport-user-util-validate-the-right-field.patch
Normal file
32
backport-user-util-validate-the-right-field.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 3db209c9567c728c13b5d901e81f151ed1d2b0f7 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 19 Jan 2024 11:32:26 +0100
|
||||
Subject: [PATCH] user-util: validate the right field
|
||||
|
||||
(cherry picked from commit 829854afa5e38db30be207fc8f8f80705e623795)
|
||||
(cherry picked from commit 624984ff423a98f1fd66e64ddfe3a8972d2f911f)
|
||||
(cherry picked from commit 641b8d700694984e40199008b059a65184dc946b)
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/systemd/systemd-stable/commit/3db209c9567c728c13b5d901e81f151ed1d2b0f7
|
||||
|
||||
---
|
||||
src/basic/user-util.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/basic/user-util.c b/src/basic/user-util.c
|
||||
index 519ab70118..c81d19409d 100644
|
||||
--- a/src/basic/user-util.c
|
||||
+++ b/src/basic/user-util.c
|
||||
@@ -314,7 +314,7 @@ int get_user_creds(
|
||||
if (shell) {
|
||||
if (FLAGS_SET(flags, USER_CREDS_CLEAN) &&
|
||||
(isempty(p->pw_shell) ||
|
||||
- !path_is_valid(p->pw_dir) ||
|
||||
+ !path_is_valid(p->pw_shell) ||
|
||||
!path_is_absolute(p->pw_shell) ||
|
||||
is_nologin_shell(p->pw_shell)))
|
||||
*shell = NULL;
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
Name: systemd
|
||||
Url: https://systemd.io/
|
||||
Version: 243
|
||||
Release: 78
|
||||
Release: 79
|
||||
License: MIT and LGPLv2+ and GPLv2+
|
||||
Summary: System and Service Manager
|
||||
|
||||
@ -305,6 +305,8 @@ Patch0257: backport-utmp-remove-dev-from-line.patch
|
||||
Patch0258: backport-core-exec-do-not-crash-with-UtmpMode-user-without-Us.patch
|
||||
Patch0259: backport-CVE-2023-50387.patch
|
||||
Patch0260: backport-CVE-2023-50868.patch
|
||||
Patch0261: backport-login-user-runtime-dir-properly-check-for-mount-poin.patch
|
||||
Patch0262: backport-user-util-validate-the-right-field.patch
|
||||
|
||||
#openEuler
|
||||
Patch9002: 1509-fix-journal-file-descriptors-leak-problems.patch
|
||||
@ -1712,6 +1714,10 @@ fi
|
||||
%exclude /usr/share/man/man3/*
|
||||
|
||||
%changelog
|
||||
* Mon Apr 29 2024 huyubiao <huyubiao@huawei.com> - 243-79
|
||||
- add backport-login-user-runtime-dir-properly-check-for-mount-poin.patch
|
||||
backport-user-util-validate-the-right-field.patch
|
||||
|
||||
* Wed Apr 17 2024 huyubiao <huyubiao@huawei.com> - 243-78
|
||||
- fix CVE-2023-50387 and CVE-2023-50868
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user