Accepting request 858004 from home:gary_lin:branches:security

Use "Requires user(tss)" for the "tss" user and group

OBS-URL: https://build.opensuse.org/request/show/858004
OBS-URL: https://build.opensuse.org/package/show/security/swtpm?expand=0&rev=12
This commit is contained in:
Gary Ching-Pang Lin 2020-12-22 08:05:26 +00:00 committed by Git OBS Bridge
parent 4d287787ed
commit 48200997b7
2 changed files with 7 additions and 9 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Dec 22 07:53:04 UTC 2020 - Gary Ching-Pang Lin <glin@suse.com>
- Use "Requires user(tss)" for the "tss" user and group
-------------------------------------------------------------------
Tue Dec 22 04:06:10 UTC 2020 - Gary Ching-Pang Lin <glin@suse.com>

View File

@ -45,6 +45,7 @@ BuildRequires: socat
Requires: iproute2
Requires: python3-cryptography
Requires: trousers
Requires: user(tss)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -89,15 +90,7 @@ make %{?_smp_mflags}
mkdir -p %{buildroot}%{_localstatedir}/lib/swtpm-localca
%post
/sbin/ldconfig
# the same user/group is employed by trousers
/usr/bin/getent group tss >/dev/null || /usr/sbin/groupadd -g 98 tss
/usr/bin/getent passwd tss >/dev/null || \
/usr/sbin/useradd -u 98 -o -g tss -s /bin/false -c "TSS daemon" \
-d /var/lib/tpm tss
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files