1 Star 0 Fork 91

胡宇彪 / systemd

forked from src-openEuler / systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-user-util-validate-the-right-field.patch 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
胡宇彪 提交于 2024-04-29 16:09 . sync patches from systemd community
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/huyubiao/systemd.git
git@gitee.com:huyubiao/systemd.git
huyubiao
systemd
systemd
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891