Fix shadow-utils to reenable user groups (#9363)

Change #7761 upgraded shadow-utils and took part of a change from upstream that modifies /etc/login.defs so that USERGROUPS_ENAB is set to no. This makes all users be created in the same group (in our case users) rather than created with their own group.

This change undoes that, so users will once again be created with their own group with the same name as the user.
This commit is contained in:
Tobias Brick 2024-06-13 19:12:11 -07:00 коммит произвёл GitHub
Родитель d751e04231
Коммит 3d6f28d55c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -1,7 +1,7 @@
Summary: Programs for handling passwords in a secure way Summary: Programs for handling passwords in a secure way
Name: shadow-utils Name: shadow-utils
Version: 4.14.3 Version: 4.14.3
Release: 1%{?dist} Release: 2%{?dist}
License: BSD License: BSD
Vendor: Microsoft Corporation Vendor: Microsoft Corporation
Distribution: Azure Linux Distribution: Azure Linux
@ -99,9 +99,6 @@ mv -v %{buildroot}%{_bindir}/passwd %{buildroot}/bin
chmod ug-s %{buildroot}/bin/passwd chmod ug-s %{buildroot}/bin/passwd
install -vm644 %{SOURCE12} %{buildroot}%{_sysconfdir}/default/useradd install -vm644 %{SOURCE12} %{buildroot}%{_sysconfdir}/default/useradd
install -vm644 %{SOURCE13} %{buildroot}%{_sysconfdir}/login.defs install -vm644 %{SOURCE13} %{buildroot}%{_sysconfdir}/login.defs
# Disable usergroups. Use "users" group by default (see /usr/sbin/useradd)
# for all nonroot users.
sed -i 's/USERGROUPS_ENAB.*/USERGROUPS_ENAB no/' %{buildroot}%{_sysconfdir}/login.defs
ln -s useradd %{buildroot}%{_sbindir}/adduser ln -s useradd %{buildroot}%{_sbindir}/adduser
cp etc/{limits,login.access} %{buildroot}%{_sysconfdir} cp etc/{limits,login.access} %{buildroot}%{_sysconfdir}
for FUNCTION in FAIL_DELAY \ for FUNCTION in FAIL_DELAY \
@ -184,6 +181,9 @@ rm -rf %{buildroot}/*
%{_libdir}/libsubid.so %{_libdir}/libsubid.so
%changelog %changelog
* Mon Jun 10 2024 Tobias Brick <tobiasb@microsoft.com> - 4.14.3-2
- Enable user groups for useradd
* Fri Feb 09 2024 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 4.14.3-1 * Fri Feb 09 2024 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 4.14.3-1
- Auto-upgrade to 4.14.3 - 3.0 Upgrade - Auto-upgrade to 4.14.3 - 3.0 Upgrade
- Remove obsolete patches and fix configure command - Remove obsolete patches and fix configure command