dont create dont-synthesize-nobody when login shell is /sbin/nologin or /usr/sbin/nologin

(cherry picked from commit ad22ea4e73c16741f302b80a552982dbea9de216)
This commit is contained in:
h30032433 2024-08-13 20:43:42 +08:00 committed by openeuler-sync-bot
parent c7e9dc608c
commit 3fb451ad0d

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