Accepting request 69499 from security:chipcard

OBS-URL: https://build.opensuse.org/request/show/69499
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pcsc-lite?expand=0&rev=29
This commit is contained in:
Sascha Peilicke
2011-05-04 12:02:59 +00:00
committed by Git OBS Bridge
4 changed files with 49 additions and 1 deletions

26
disable-power-off.diff Normal file
View File

@@ -0,0 +1,26 @@
Index: src/pcscd.h
===================================================================
--- src/pcscd.h.orig
+++ src/pcscd.h
@@ -63,7 +63,7 @@ enum
#define PCSCLITE_STATUS_EVENT_TIMEOUT 10*60*1000 /* 10 minutes */
/* Uncomment the next line if you do NOT want to use auto power off */
-/* #define DISABLE_ON_DEMAND_POWER_ON */
+#define DISABLE_ON_DEMAND_POWER_ON
/* Uncomment the next line if you do not want the card to be powered on
* when inserted */
Index: src/pcscd.h.in
===================================================================
--- src/pcscd.h.in.orig
+++ src/pcscd.h.in
@@ -63,7 +63,7 @@ enum
#define PCSCLITE_STATUS_EVENT_TIMEOUT 10*60*1000 /* 10 minutes */
/* Uncomment the next line if you do NOT want to use auto power off */
-/* #define DISABLE_ON_DEMAND_POWER_ON */
+#define DISABLE_ON_DEMAND_POWER_ON
/* Uncomment the next line if you do not want the card to be powered on
* when inserted */

View File

@@ -45,8 +45,18 @@ if [ -f /etc/sysconfig/pcscd ] ; then
. /etc/sysconfig/pcscd
fi
cleanup() {
# if comm socket exists but pid file is absent pcscd fails to start
# bnc#686674
if [ -S /var/run/pcscd/pcscd.comm -a ! -e /var/run/pcscd/pcscd.pid ]; then
# check if a pcscd instance is running and remove the socket in case it's not
checkproc $exec || rm /var/run/pcscd/pcscd.comm
fi
}
start() {
echo -n "Starting PC/SC smart card daemon ($prog): "
cleanup
startproc $exec $PCSCD_OPTIONS
retval=$?
rc_status
@@ -58,7 +68,7 @@ stop() {
killproc $exec
retval=$?
rc_status
[ $retval -eq 0 ] && rm -f $lockfile && rm -f /var/run/pcscd/*
[ $retval -eq 0 ] && rm -f $lockfile
rc_status -v
}
restart() {

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue May 3 20:15:49 UTC 2011 - wr@rosenauer.org
- make startup more robust by checking status files (bnc#686674)
-------------------------------------------------------------------
Mon May 2 22:26:56 UTC 2011 - wr@rosenauer.org
- disable auto power off/on feature
-------------------------------------------------------------------
Tue Apr 5 09:37:24 UTC 2011 - wr@rosenauer.org

View File

@@ -45,6 +45,7 @@ Source3: pre_checkin.sh
Source4: baselibs.conf
Source5: pcsc-lite-init
Source6: pcsc-lite-reader-conf
Patch0: disable-power-off.diff
Requires: libpcsclite1 >= %{version}
%if %suse_version > 1130
PreReq: sysvinit(syslog)
@@ -107,6 +108,7 @@ compile plugins for the pcsc-lite package.
%prep
%setup -q
%patch0
cp -a %{S:1} %{S:2} %{S:5} %{S:6} .
%build