!702 [sync] PR-701: dont create dont-synthesize-nobody when login shell is /sbin/nologin or /usr/sbin/nologin

From: @openeuler-sync-bot 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
This commit is contained in:
openeuler-ci-bot 2024-08-16 07:50:06 +00:00 committed by Gitee
commit 57d1eab45c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -25,7 +25,7 @@
Name: systemd
Url: https://systemd.io/
Version: 255
Release: 20
Release: 21
License: MIT and LGPLv2+ and GPLv2+
Summary: System and Service Manager
@ -734,7 +734,7 @@ if getent passwd nfsnobody &>/dev/null; then
mkdir -p /etc/systemd || :
: >/etc/systemd/dont-synthesize-nobody || :
}
elif getent passwd nobody 2>/dev/null | grep -v 'nobody:[x*]:65534:65534:.*:/:/sbin/nologin' &>/dev/null; then
elif getent passwd nobody 2>/dev/null | grep -v 'nobody:[x*]:65534:65534:.*:/:/sbin/nologin' | grep -v 'nobody:[x*]:65534:65534:.*:/:/usr/sbin/nologin' &>/dev/null; then
test -f /etc/systemd/dont-synthesize-nobody || {
echo 'Detected system with incompatible nobody defined, creating /etc/systemd/dont-synthesize-nobody'
mkdir -p /etc/systemd || :
@ -1658,6 +1658,9 @@ fi
%{_unitdir}/veritysetup.target
%changelog
* Tue Aug 13 2024 huyubiao <huyubiao@huawei.com> - 255-21
- DESC:dont create dont-synthesize-nobody when login shell is /sbin/nologin or /usr/sbin/nologin
* Fri Jul 26 2024 Han Jinpeng <hanjinpeng@kylinos.cn> - 255-20
- backport: fix cgtop sscanf return code checks