!42 【轻量级 PR】:在安装阶段创建tss用户

From: @jinlun123123 
Reviewed-by: @huangzq6 
Signed-off-by: @huangzq6
This commit is contained in:
openeuler-ci-bot 2023-12-14 03:06:43 +00:00 committed by Gitee
commit 182f07e98f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,6 +1,6 @@
Name: tpm2-tss
Version: 3.1.0
Release: 3
Release: 4
Summary: TPM2.0 Software Stack
License: BSD
URL: https://github.com/tpm2-software/tpm2-tss
@ -9,6 +9,7 @@ Source0: https://github.com/tpm2-software/tpm2-tss/releases/download/%{ver
Patch1: backport-CVE-2023-22745.patch
BuildRequires: gcc-c++ autoconf-archive libtool pkgconfig systemd libgcrypt-devel openssl-devel doxygen json-c-devel libcurl-devel
Requires(pre): shadow
%description
tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system
@ -42,6 +43,15 @@ rm -rf %{buildroot}
make check
%pre
getent group tss >/dev/null || groupadd -f -g 59 -r tss
if ! getent passwd tss >/dev/null ; then
if ! getent passwd 59 >/dev/null ; then
useradd -r -u 59 -g tss -d /dev/null -s /sbin/nologin -c "Account used for TPM access" tss
else
useradd -r -g tss -d /dev/null -s /sbin/nologin -c "Account used for TPM access" tss
fi
fi
exit 0
%preun
@ -71,6 +81,12 @@ make check
%{_mandir}/man*/*
%changelog
* Thu Dec 14 2023 jinlun <jinlun@huawei.com> - 3.1.0-4
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Specifies the owner group 59 of a user.
* Tue Jan 31 2023 huangzq6 <huangzhenqiang2@huawei.com> - 3.1.0-3
- Type:CVE
- ID:NA