From 4008088d6873eb2faeb6f3b8fbfccf035575e896eb118114f3de9ef908743198 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 6 Dec 2018 13:55:44 +0000 Subject: [PATCH] Accepting request 652754 from home:jengelh:branches:security - Do not ignore errors from groupadd. If groupadd fails, installation ought not to proceed because files would have the wrong ownership. OBS-URL: https://build.opensuse.org/request/show/652754 OBS-URL: https://build.opensuse.org/package/show/security/openCryptoki?expand=0&rev=85 --- openCryptoki.changes | 7 +++++++ openCryptoki.spec | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/openCryptoki.changes b/openCryptoki.changes index 73145a7..f0f3e61 100644 --- a/openCryptoki.changes +++ b/openCryptoki.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Nov 30 00:04:41 UTC 2018 - Jan Engelhardt + +- Do not ignore errors from groupadd. If groupadd fails, + installation ought not to proceed because files would have the + wrong ownership. + ------------------------------------------------------------------- Thu Nov 29 22:45:36 UTC 2018 - mpost@suse.com diff --git a/openCryptoki.spec b/openCryptoki.spec index 10087d3..6047b08 100644 --- a/openCryptoki.spec +++ b/openCryptoki.spec @@ -157,11 +157,11 @@ find %{buildroot} -type f -name "*.la" -delete -print rm -f %{buildroot}%{_libdir}/opencryptoki/methods %pre -%{service_add_pre pkcsslotd.service} # autobuild:/work/cd/lib/misc/group # openCryptoki pkcs11:x:64: -%{_bindir}/getent group %{pkcs11_group_id} >/dev/null || %{_sbindir}/groupadd -g %{pkcs11_group_id} -r pkcs11 || true +%{_bindir}/getent group %{pkcs11_group_id} >/dev/null || %{_sbindir}/groupadd -g %{pkcs11_group_id} -r pkcs11 %{_sbindir}/usermod -a -G pkcs11 root +%{service_add_pre pkcsslotd.service} %preun %{service_del_preun pkcsslotd.service}