spec: remove nsswitch.conf scriptlet
Related to: https://fedoraproject.org/wiki/Changes/Make_Authselect_Mandatory Both systemd and resolved nss modules are now enabled by default in authselect. Users are now expected to use authselect to configure the system and packages should no longer support non-authselect configurations. Resolves: rhbz#2023743
This commit is contained in:
parent
b24b99d669
commit
0898a89444
38
systemd.spec
38
systemd.spec
@ -31,7 +31,7 @@ Name: systemd
|
||||
Url: https://www.freedesktop.org/wiki/Software/systemd
|
||||
%if %{without inplace}
|
||||
Version: 250~rc1
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
%else
|
||||
# determine the build information from local checkout
|
||||
Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/')
|
||||
@ -817,39 +817,6 @@ systemctl --no-reload preset systemd-oomd.service &>/dev/null || :
|
||||
%post libs
|
||||
%{?ldconfig}
|
||||
|
||||
function mod_nss() {
|
||||
if [ -f "$1" ] ; then
|
||||
# Add nss-systemd to passwd and group
|
||||
grep -E -q '^(passwd|group):.* systemd' "$1" ||
|
||||
sed -i.bak -r -e '
|
||||
s/^(passwd|group):(.*)/\1:\2 systemd/
|
||||
' "$1" &>/dev/null || :
|
||||
|
||||
# Add nss-resolve to hosts
|
||||
if grep -E -q '^hosts:.* resolve' "$1"; then
|
||||
sed -i.bak -r -e '
|
||||
s/^(hosts):(.*) files( .*) myhostname dns/\1:\2 files myhostname\3 dns/
|
||||
' "$1" &>/dev/null || :
|
||||
|
||||
else
|
||||
sed -i.bak -r -e '
|
||||
s/^(hosts):(.*) files( mdns4_minimal .NOTFOUND=return.)? dns myhostname/\1:\2 files myhostname\3 resolve [!UNAVAIL=return] dns/
|
||||
' "$1" &>/dev/null || :
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
FILE="$(readlink /etc/nsswitch.conf || echo /etc/nsswitch.conf)"
|
||||
if [ "$FILE" = "/etc/authselect/nsswitch.conf" ] && authselect check &>/dev/null; then
|
||||
mod_nss "/etc/authselect/user-nsswitch.conf"
|
||||
authselect apply-changes &> /dev/null || :
|
||||
else
|
||||
mod_nss "$FILE"
|
||||
# also apply the same changes to user-nsswitch.conf to affect
|
||||
# possible future authselect configuration
|
||||
mod_nss "/etc/authselect/user-nsswitch.conf"
|
||||
fi
|
||||
|
||||
# check if nobody or nfsnobody is defined
|
||||
export SYSTEMD_NSS_BYPASS_SYNTHETIC=1
|
||||
if getent passwd nfsnobody &>/dev/null; then
|
||||
@ -1042,6 +1009,9 @@ fi
|
||||
%files standalone-sysusers -f .file-list-standalone-sysusers
|
||||
|
||||
%changelog
|
||||
* Fri Dec 10 2021 Pavel Březina <pbrezina@redhat.com> - 250~rc1-3
|
||||
- Remove nsswitch.conf scriptlets (#2023743)
|
||||
|
||||
* Thu Dec 9 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 250~rc1-1
|
||||
- Version 250-rc1,
|
||||
see https://raw.githubusercontent.com/systemd/systemd/v250-rc1/NEWS for
|
||||
|
Loading…
Reference in New Issue
Block a user