Accepting request 147441 from home:sbrabec:branches:security:chipcard

- Fix path to nologin in useradd (bnc#796242).

OBS-URL: https://build.opensuse.org/request/show/147441
OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pcsc-lite?expand=0&rev=85
This commit is contained in:
Stanislav Brabec 2013-01-07 19:05:37 +00:00 committed by Git OBS Bridge
parent 4ab251b3b7
commit 426cd1ce14
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Jan 7 19:44:56 CET 2013 - sbrabec@suse.cz
- Fix path to nologin in useradd (bnc#796242).
-------------------------------------------------------------------
Fri Nov 30 08:34:00 UTC 2012 - wr@rosenauer.org

View File

@ -1,7 +1,7 @@
#
# spec file for package pcsc-lite
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -159,7 +159,12 @@ rm -rf $RPM_BUILD_ROOT
%pre
getent group %{GROUP} >/dev/null || groupadd -r %{GROUP}
getent passwd %{USER} >/dev/null || useradd -r -g %{GROUP} -s /bin/nologin -c "Smart Card Reader" -d /var/run/pcscd %{USER}
if getent passwd %{USER} >/dev/null ; then
# There was a bad login shell up to openSUSE 12.2 (bnc#796242), never in SLE. Fix it.
usermod -s /usr/sbin/nologin %{USER}
else
useradd -r -g %{GROUP} -s /usr/sbin/nologin -c "Smart Card Reader" -d /var/run/pcscd %{USER}
fi
%if %suse_version > 1140
%service_add_pre pcscd.service pcscd.socket
%endif