Accepting request 645756 from home:vrothberg:branches:Base:System

- Add empty /etc/sub{u,g}id files. useradd and usermod add entries for users
  only when those files exist. Having those entries is a requirement to create
  user namespaces, for instance, when running podman as a non-root user.

OBS-URL: https://build.opensuse.org/request/show/645756
OBS-URL: https://build.opensuse.org/package/show/Base:System/shadow?expand=0&rev=54
This commit is contained in:
Michael Vetter 2018-11-02 11:24:14 +00:00 committed by Git OBS Bridge
parent 60780ba34c
commit ef0b03d80a
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Oct 31 14:17:29 UTC 2018 - Valentin Rothberg <vrothberg@suse.com>
- Add empty /etc/sub{u,g}id files. useradd and usermod add entries for users
only when those files exist. Having those entries is a requirement to create
user namespaces, for instance, when running podman as a non-root user.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon May 14 12:45:42 UTC 2018 - mvetter@suse.com Mon May 14 12:45:42 UTC 2018 - mvetter@suse.com

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
@ -20,7 +20,7 @@ Name: shadow
Version: 4.6 Version: 4.6
Release: 0 Release: 0
Summary: Utilities to Manage User and Group Accounts Summary: Utilities to Manage User and Group Accounts
License: BSD-3-Clause AND GPL-2.0+ License: BSD-3-Clause AND GPL-2.0-or-later
Group: System/Base Group: System/Base
Url: https://github.com/shadow-maint/shadow Url: https://github.com/shadow-maint/shadow
Source: https://github.com/shadow-maint/shadow/releases/download/%{version}/shadow-%{version}.tar.xz Source: https://github.com/shadow-maint/shadow/releases/download/%{version}/shadow-%{version}.tar.xz
@ -114,6 +114,10 @@ install -m 0755 %{SOURCE5} %{buildroot}/%{_sbindir}/
install -Dm644 %{SOURCE6} %{buildroot}%{_unitdir}/shadow.service install -Dm644 %{SOURCE6} %{buildroot}%{_unitdir}/shadow.service
install -Dm644 %{SOURCE7} %{buildroot}%{_unitdir}/shadow.timer install -Dm644 %{SOURCE7} %{buildroot}%{_unitdir}/shadow.timer
# add empty /etc/sub{u,g}id files
touch %{buildroot}/%{_sysconfdir}/subuid
touch %{buildroot}/%{_sysconfdir}/subgid
# Remove binaries we don't use. # Remove binaries we don't use.
rm %{buildroot}/%{_bindir}/groups rm %{buildroot}/%{_bindir}/groups
rm %{buildroot}/%{_mandir}/man1/groups.* rm %{buildroot}/%{_mandir}/man1/groups.*
@ -210,6 +214,8 @@ rm -rf %{buildroot}%{_mandir}/{??,??_??}
%doc NEWS doc/HOWTO README README.changes-pwdutils %doc NEWS doc/HOWTO README README.changes-pwdutils
%attr(0644,root,root) %config %{_sysconfdir}/login.defs %attr(0644,root,root) %config %{_sysconfdir}/login.defs
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/default/useradd %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/default/useradd
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/subuid
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/subgid
%config %{_sysconfdir}/pam.d/chage %config %{_sysconfdir}/pam.d/chage
%config %{_sysconfdir}/pam.d/chfn %config %{_sysconfdir}/pam.d/chfn
%config %{_sysconfdir}/pam.d/chsh %config %{_sysconfdir}/pam.d/chsh