Hello community,

here is the log from the commit of package pcsc-lite for openSUSE:Factory 
checked in at 2019-04-04 14:11:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pcsc-lite (Old)
 and      /work/SRC/openSUSE:Factory/.pcsc-lite.new.3908 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pcsc-lite"

Thu Apr  4 14:11:47 2019 rev:82 rq:690573 version:1.8.25

Changes:
--------
--- /work/SRC/openSUSE:Factory/pcsc-lite/pcsc-lite.changes      2019-02-11 
21:17:13.299342502 +0100
+++ /work/SRC/openSUSE:Factory/.pcsc-lite.new.3908/pcsc-lite.changes    
2019-04-04 14:11:49.149281304 +0200
@@ -1,0 +2,10 @@
+Tue Apr  2 08:28:59 UTC 2019 - Wolfgang Rosenauer <w...@rosenauer.org>
+
+- Updated to version 1.8.25
+  * Fix a socket issue when pcscd is used inside LXC container
+  * pcsc-spy: always provide a total time of execution
+  * Fix resource leak if SCardEstablishContext() fails
+  * Fix realloc(3) error handling (possible memory leak)
+  * Remove usage of function chmod(2) to use fchmod(2) (fix race condition)
+
+-------------------------------------------------------------------

Old:
----
  pcsc-lite-1.8.24.tar.bz2
  pcsc-lite-1.8.24.tar.bz2.asc

New:
----
  pcsc-lite-1.8.25.tar.bz2
  pcsc-lite-1.8.25.tar.bz2.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pcsc-lite.spec ++++++
--- /var/tmp/diff_new_pack.LJh4Cm/_old  2019-04-04 14:11:50.093281800 +0200
+++ /var/tmp/diff_new_pack.LJh4Cm/_new  2019-04-04 14:11:50.093281800 +0200
@@ -26,7 +26,7 @@
 %define PKG_USER       scard
 %define PKG_GROUP      scard
 Name:           pcsc-lite
-Version:        1.8.24
+Version:        1.8.25
 Release:        0
 Summary:        PC/SC Smart Cards Library
 License:        BSD-3-Clause AND GPL-3.0-or-later

++++++ pcsc-lite-1.8.24.tar.bz2 -> pcsc-lite-1.8.25.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/ChangeLog 
new/pcsc-lite-1.8.25/ChangeLog
--- old/pcsc-lite-1.8.24/ChangeLog      2018-10-12 11:06:13.000000000 +0200
+++ new/pcsc-lite-1.8.25/ChangeLog      2019-03-25 20:57:29.000000000 +0100
@@ -1,3 +1,12 @@
+1.8.25: Ludovic Rousseau
+25 March 2019
+- Fix a socket issue when pcscd is used inside LXC container
+- pcsc-spy: always provide a total time of execution
+- Fix resource leak if SCardEstablishContext() fails
+- Fix realloc(3) error handling (possible memory leak)
+- Remove usage of function chmod(2) to use fchmod(2) (fix race condition)
+
+
 1.8.24: Ludovic Rousseau
 12 October 2018
 - the project moved to https://pcsclite.apdu.fr/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/ChangeLog.git 
new/pcsc-lite-1.8.25/ChangeLog.git
--- old/pcsc-lite-1.8.24/ChangeLog.git  2018-10-12 11:11:29.000000000 +0200
+++ new/pcsc-lite-1.8.25/ChangeLog.git  2019-03-25 20:59:51.000000000 +0100
@@ -1,4 +1,185 @@
-commit 73d95ada3221c060cbd7b6aa2375453f9d0e359b (HEAD -> master, 
origin/master, origin/HEAD)
+commit efc56971cb8f8bf9cb44090bb3851d8c1d2a00f7 (HEAD -> master, tag: 
pcsc-1.8.25, origin/master, origin/HEAD)
+Author: Ludovic Rousseau <ludovic.rouss...@free.fr>
+Date:   Mon Mar 25 20:56:43 2019 +0100
+
+    Release 1.8.25
+
+ ChangeLog    | 9 +++++++++
+ configure.ac | 2 +-
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+commit d627aee864c3e9ce40e375fcc0e34a7855b6f0f1 (zotac/master, github/master)
+Author: Ludovic Rousseau <ludovic.rouss...@free.fr>
+Date:   Sun Mar 24 14:51:41 2019 +0100
+
+    pcscd.socket.in: explicitly set socket file mode
+    
+    Fixes Debian #924914
+    Thanks to Mathias Behrle for the patch
+
+ etc/pcscd.socket.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit b9e6fe054c2ce883ce6070d4a5761d9d1e1da1bc (zmaster)
+Author: Ludovic Rousseau <ludovic.rouss...@free.fr>
+Date:   Fri Mar 22 10:39:14 2019 +0100
+
+    pcsc-spy: always a total time of execution
+    
+    Use the latest function return to compute the total execution time.
+    
+    Now the total time is always available. If the latest PC/SC command
+    does not return (because the process has been interrupted) the total
+    time may be a bit shorter than expected but it is less problematic than
+    no total tiem at all.
+
+ src/spy/pcsc-spy | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+commit 9561e5562d5fb00540589ccb9e4744366ec4b310
+Author: Ludovic Rousseau <ludovic.rouss...@free.fr>
+Date:   Fri Mar 22 10:21:35 2019 +0100
+
+    pcsc-spy: fix a typo in a comment
+
+ src/spy/pcsc-spy | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit e641eaa72530bd8188ff584e33d06bf60a384995
+Author: Ludovic Rousseau <ludovic.rouss...@free.fr>
+Date:   Wed Jan 16 11:03:19 2019 +0100
+
+    Doc: more explicit documentation for −−auto−exit
+    
+    pcscd does not exit after 60 seconds but after 60 seconds of inactivity
+    after the release of the last PC/SC context.
+    If you start pcscd with −−auto−exit but do run any PC/SC application
+    then pcscd will NOT exit after 60 seconds.
+    
+    Thanks to Matthias Apitz for the bug report.
+
+ doc/pcscd.8.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 36c8eae890dc81f0e25ebf0be1c6a969ffd9543a
+Author: vegaMato <localh...@azet.sk>
+Date:   Tue Dec 18 18:37:22 2018 +0100
+
+    Remove usage of function chmod(2) to use fchmod(2)
+    
+    Race condition possibility; CWE-362: Concurrent Execution using Shared
+    Resource with Improper Synchronization ('Race Condition')
+    
+    Thanks to PA193 project
+    https://github.com/vegaMato/PCSC-lite-project-tasks
+
+ src/pcscdaemon.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit 430043842e05a300f1dda1b93fcfa8fceadd81e5
+Author: St4lkerino <denis.varg...@gmail.com>
+Date:   Tue Dec 18 19:22:32 2018 +0100
+
+    Fix realloc(3) error handling
+    
+    From realloc(3) manpage:
+           The realloc() function returns a pointer to the newly allocated 
memory,
+           which  is  suitably  aligned for any built-in type and may be 
different
+           from ptr, or NULL if the request fails.  If size was equal to 0, 
either
+           NULL  or  a  pointer  suitable  to be passed to free() is returned. 
 If
+           realloc() fails, the original block is left untouched; it is not  
freed
+           or moved.
+    
+    If realloc() fails then the memory that was previously allocated needs
+    to be freed, or it will create a memory leak.
+    
+    It was not a real problem because if realloc(3) failed then pcscd would
+    exit immediatly and the memory would not leak for a long time.
+    
+    Thanks to PA193 project
+    https://github.com/vegaMato/PCSC-lite-project-tasks
+
+ src/hotplug_libudev.c | 8 ++++++--
+ src/hotplug_libusb.c  | 6 ++++--
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+commit ad8c6fb98d29ccca5c5ae5287311b845f42853f1
+Author: Ludovic Rousseau <ludovic.rouss...@free.fr>
+Date:   Thu Jan 3 19:11:55 2019 +0100
+
+    pcscd: update copyright dates returned by --version
+
+ src/pcscdaemon.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit ea89e0598f86e56d51126addcbab97c4d722cd79
+Author: Ludovic Rousseau <ludovic.rouss...@free.fr>
+Date:   Sat Dec 15 13:43:10 2018 +0100
+
+    log: on GNU/Linux a pthread_t is unsigned
+    
+    Do not log the thread id as a signed integer.
+    We should not have logs like:
+    00000012 [-1211058432] pcscdaemon.c:352:main() Force colored logs
+
+ src/debuglog.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9d5572b85c1f827e8e7075e34d4c11293188963e
+Author: Ludovic Rousseau <ludovic.rouss...@free.fr>
+Date:   Wed Dec 12 17:45:05 2018 +0100
+
+    .gitignore: ignore doc/api
+
+ .gitignore | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 4e736c11d6414b1bc2cc8cccbde1f784e08e2dd7
+Author: Ludovic Rousseau <ludovic.rouss...@free.fr>
+Date:   Fri Dec 7 09:28:12 2018 +0100
+
+    Remove 2 outdated comments about card always powered on
+    
+    Since "Card auto power on and off" feature as been introduced in 2010
+    the card is _not_ always powered.
+    
+    Thanks to Jan Parcel for the bug report.
+
+ src/winscard.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+commit 53ab2bc875d24c80d2069440cf2a9ec95eda892d
+Author: Ludovic Rousseau <ludovic.rouss...@free.fr>
+Date:   Mon Nov 26 15:04:55 2018 +0100
+
+    MSGRemoveContext: remove dead code
+    
+    Issue found by Coverity:
+    >>>     CID 1441490:  Code maintainability issues  (UNUSED_VALUE)
+    >>>     Assigning value "2148532329L" to "rv" here, but that stored value 
is overwritten before it can be used.
+
+ UnitaryTests/SCardBeginTransaction_SharedMode.py | 2 +-
+ src/winscard_svc.c                               | 2 --
+ 2 files changed, 1 insertion(+), 3 deletions(-)
+
+commit dd34cb3695cfee90e4cc8720446b1116ca19e2d0
+Author: Ludovic Rousseau <ludovic.rouss...@free.fr>
+Date:   Thu Nov 15 11:54:31 2018 +0100
+
+    Fix resource leak if SCardEstablishContext() fails
+    
+    When SCardEstablishContext() failed after the connection to the daemon
+    was made (for example when polkit is used) then the socket to the daemon
+    was not closed.
+    
+    Thanks to MartinN-n for the bug report
+    "Leaking sockets #50"
+    https://github.com/LudovicRousseau/PCSC/issues/50
+
+ src/winscard_clnt.c | 24 ++++++++++++++++++------
+ 1 file changed, 18 insertions(+), 6 deletions(-)
+
+commit 73d95ada3221c060cbd7b6aa2375453f9d0e359b (tag: pcsc-1.8.24)
 Author: Ludovic Rousseau <ludovic.rouss...@free.fr>
 Date:   Fri Oct 12 10:43:51 2018 +0200
 
@@ -82,7 +263,7 @@
  COPYING | 24 ------------------------
  1 file changed, 24 deletions(-)
 
-commit db6b67acf7027ecbc275cdb8242cddf3e6508b26 (zotac/master, zmaster)
+commit db6b67acf7027ecbc275cdb8242cddf3e6508b26
 Author: Ludovic Rousseau <ludovic.rouss...@free.fr>
 Date:   Mon Oct 8 14:41:53 2018 +0200
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/Makefile.in 
new/pcsc-lite-1.8.25/Makefile.in
--- old/pcsc-lite-1.8.24/Makefile.in    2018-10-12 11:11:09.000000000 +0200
+++ new/pcsc-lite-1.8.25/Makefile.in    2019-03-25 20:59:45.000000000 +0100
@@ -164,7 +164,7 @@
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
        $(top_srcdir)/src/PCSC/pcsclite.h.in AUTHORS COPYING ChangeLog \
        INSTALL NEWS README TODO ar-lib compile config.guess \
-       config.sub install-sh ltmain.sh missing ylwrap
+       config.sub depcomp install-sh ltmain.sh missing ylwrap
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/configure 
new/pcsc-lite-1.8.25/configure
--- old/pcsc-lite-1.8.24/configure      2018-10-12 11:11:08.000000000 +0200
+++ new/pcsc-lite-1.8.25/configure      2019-03-25 20:59:45.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for pcsc-lite 1.8.24.
+# Generated by GNU Autoconf 2.69 for pcsc-lite 1.8.25.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@
 # Identity of this package.
 PACKAGE_NAME='pcsc-lite'
 PACKAGE_TARNAME='pcsc-lite'
-PACKAGE_VERSION='1.8.24'
-PACKAGE_STRING='pcsc-lite 1.8.24'
+PACKAGE_VERSION='1.8.25'
+PACKAGE_STRING='pcsc-lite 1.8.25'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1392,7 +1392,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures pcsc-lite 1.8.24 to adapt to many kinds of systems.
+\`configure' configures pcsc-lite 1.8.25 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1463,7 +1463,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of pcsc-lite 1.8.24:";;
+     short | recursive ) echo "Configuration of pcsc-lite 1.8.25:";;
    esac
   cat <<\_ACEOF
 
@@ -1615,7 +1615,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-pcsc-lite configure 1.8.24
+pcsc-lite configure 1.8.25
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2091,7 +2091,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by pcsc-lite $as_me 1.8.24, which was
+It was created by pcsc-lite $as_me 1.8.25, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2955,7 +2955,7 @@
 
 # Define the identity of the package.
  PACKAGE='pcsc-lite'
- VERSION='1.8.24'
+ VERSION='1.8.25'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -16172,7 +16172,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by pcsc-lite $as_me 1.8.24, which was
+This file was extended by pcsc-lite $as_me 1.8.25, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16238,7 +16238,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-pcsc-lite config.status 1.8.24
+pcsc-lite config.status 1.8.25
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/configure.ac 
new/pcsc-lite-1.8.25/configure.ac
--- old/pcsc-lite-1.8.24/configure.ac   2018-10-12 11:06:13.000000000 +0200
+++ new/pcsc-lite-1.8.25/configure.ac   2019-03-25 20:57:29.000000000 +0100
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.69])
 
-AC_INIT([pcsc-lite],[1.8.24])
+AC_INIT([pcsc-lite],[1.8.25])
 AC_CONFIG_SRCDIR(src/pcscdaemon.c)
 AM_INIT_AUTOMAKE(1.8 dist-bzip2 no-dist-gzip)
 AC_CONFIG_HEADERS([config.h])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/doc/pcscd.8.in 
new/pcsc-lite-1.8.25/doc/pcscd.8.in
--- old/pcsc-lite-1.8.24/doc/pcscd.8.in 2018-07-15 22:51:16.000000000 +0200
+++ new/pcsc-lite-1.8.25/doc/pcscd.8.in 2019-03-24 13:43:26.000000000 +0100
@@ -73,7 +73,8 @@
 .
 .TP
 .BR \-x ", " \-\-auto\-exit
-pcscd will quit after 60 seconds of inactivity. This is used when pcscd
+pcscd will quit after 60 seconds of inactivity after the release of
+the last PC/SC context. This is used when pcscd
 os started on demand by systemd.
 .TP
 .BR \-S ", " \-\-reader\-name\-no\-serial
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/etc/pcscd.socket.in 
new/pcsc-lite-1.8.25/etc/pcscd.socket.in
--- old/pcsc-lite-1.8.24/etc/pcscd.socket.in    2018-07-15 22:51:16.000000000 
+0200
+++ new/pcsc-lite-1.8.25/etc/pcscd.socket.in    2019-03-24 13:44:43.000000000 
+0100
@@ -3,6 +3,7 @@
 
 [Socket]
 ListenStream=@ipcdir@/pcscd.comm
+SocketMode=0666
 
 [Install]
 WantedBy=sockets.target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/src/PCSC/pcsclite.h 
new/pcsc-lite-1.8.25/src/PCSC/pcsclite.h
--- old/pcsc-lite-1.8.24/src/PCSC/pcsclite.h    2018-10-12 11:11:22.000000000 
+0200
+++ new/pcsc-lite-1.8.25/src/PCSC/pcsclite.h    2019-03-25 20:59:50.000000000 
+0100
@@ -279,7 +279,7 @@
 #define INFINITE                       0xFFFFFFFF      /**< Infinite timeout */
 #endif
 
-#define PCSCLITE_VERSION_NUMBER                "1.8.24"        /**< Current 
version */
+#define PCSCLITE_VERSION_NUMBER                "1.8.25"        /**< Current 
version */
 /** Maximum readers context (a slot is count as a reader) */
 #define PCSCLITE_MAX_READERS_CONTEXTS                  16
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/src/debuglog.c 
new/pcsc-lite-1.8.25/src/debuglog.c
--- old/pcsc-lite-1.8.24/src/debuglog.c 2018-10-12 10:46:31.000000000 +0200
+++ new/pcsc-lite-1.8.25/src/debuglog.c 2019-03-24 13:43:26.000000000 +0100
@@ -190,7 +190,7 @@
 #ifdef __APPLE__
 #define THREAD_FORMAT "%p"
 #else
-#define THREAD_FORMAT "%ld"
+#define THREAD_FORMAT "%lu"
 #endif
                        printf("%s%.8d%s [" THREAD_FORMAT "] %s%s%s\n",
                                time_pfx, delta, time_sfx, thread_id,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/src/hotplug_libudev.c 
new/pcsc-lite-1.8.25/src/hotplug_libudev.c
--- old/pcsc-lite-1.8.24/src/hotplug_libudev.c  2018-10-12 11:06:13.000000000 
+0200
+++ new/pcsc-lite-1.8.25/src/hotplug_libudev.c  2019-03-24 13:43:26.000000000 
+0100
@@ -228,15 +228,19 @@
                                        Log2(PCSC_LOG_INFO,
                                                "Increase driverTracker to %d 
entries", driverSize);
 #endif
-                                       driverTracker = realloc(driverTracker,
+
+                                       void* tmp = realloc(driverTracker,
                                                driverSize * 
sizeof(*driverTracker));
-                                       if (NULL == driverTracker)
+
+                                       if (NULL == tmp)
                                        {
+                                               free(driverTracker);
                                                Log1(PCSC_LOG_CRITICAL, "Not 
enough memory");
                                                driverSize = -1;
                                                (void)closedir(hpDir);
                                                return -1;
                                        }
+                                       driverTracker = tmp;
 
                                        /* clean the newly allocated entries */
                                        for 
(i=driverSize-DRIVER_TRACKER_SIZE_STEP; i<driverSize; i++)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/src/hotplug_libusb.c 
new/pcsc-lite-1.8.25/src/hotplug_libusb.c
--- old/pcsc-lite-1.8.24/src/hotplug_libusb.c   2018-07-15 22:51:16.000000000 
+0200
+++ new/pcsc-lite-1.8.25/src/hotplug_libusb.c   2019-03-24 13:43:26.000000000 
+0100
@@ -234,15 +234,17 @@
                                        Log2(PCSC_LOG_INFO,
                                                "Increase driverTracker to %d 
entries", driverSize);
 #endif
-                                       driverTracker = realloc(driverTracker,
+                                       void* tmp = realloc(driverTracker,
                                                driverSize * 
sizeof(*driverTracker));
-                                       if (NULL == driverTracker)
+                                       if (NULL == tmp)
                                        {
+                                               free(driverTracker);
                                                Log1(PCSC_LOG_CRITICAL, "Not 
enough memory");
                                                driverSize = -1;
                                                closedir(hpDir);
                                                return -1;
                                        }
+                                       driverTracker = tmp;
 
                                        /* clean the newly allocated entries */
                                        for 
(i=driverSize-DRIVER_TRACKER_SIZE_STEP; i<driverSize; i++)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/src/pcscd.h 
new/pcsc-lite-1.8.25/src/pcscd.h
--- old/pcsc-lite-1.8.24/src/pcscd.h    2018-10-12 11:11:22.000000000 +0200
+++ new/pcsc-lite-1.8.25/src/pcscd.h    2019-03-25 20:59:50.000000000 +0100
@@ -49,7 +49,7 @@
 
 #define PCSCLITE_CSOCK_NAME            PCSCLITE_IPC_DIR "/pcscd.comm"
 
-#define PCSCLITE_VERSION_NUMBER                "1.8.24"        /**< Current 
version */
+#define PCSCLITE_VERSION_NUMBER                "1.8.25"        /**< Current 
version */
 #define PCSCLITE_STATUS_POLL_RATE      400000          /**< Status polling 
rate */
 #define PCSCLITE_LOCK_POLL_RATE                100000          /**< Lock 
polling rate */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/src/pcscdaemon.c 
new/pcsc-lite-1.8.25/src/pcscdaemon.c
--- old/pcsc-lite-1.8.24/src/pcscdaemon.c       2018-07-15 22:51:16.000000000 
+0200
+++ new/pcsc-lite-1.8.25/src/pcscdaemon.c       2019-03-24 13:43:26.000000000 
+0100
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 1999-2002
  *  David Corcoran <corco...@musclecard.com>
- * Copyright (C) 2002-2011
+ * Copyright (C) 2002-2018
  *  Ludovic Rousseau <ludovic.rouss...@free.fr>
  *
 Redistribution and use in source and binary forms, with or without
@@ -685,12 +685,13 @@
                                        "writing " PCSCLITE_RUN_PID " failed: 
%s",
                                        strerror(errno));
                        }
-                       (void)close(f);
 
                        /* set mode so that the file is world readable even is 
umask is
                         * restrictive
                         * The file is used by libpcsclite */
-                       (void)chmod(PCSCLITE_RUN_PID, mode);
+                       (void)fchmod(f, mode);
+
+                       (void)close(f);
                }
                else
                        Log2(PCSC_LOG_CRITICAL, "cannot create " 
PCSCLITE_RUN_PID ": %s",
@@ -835,7 +836,7 @@
 {
        printf("%s version %s.\n",  PACKAGE, VERSION);
        printf("Copyright (C) 1999-2002 by David Corcoran 
<corco...@musclecard.com>.\n");
-       printf("Copyright (C) 2001-2015 by Ludovic Rousseau 
<ludovic.rouss...@free.fr>.\n");
+       printf("Copyright (C) 2001-2018 by Ludovic Rousseau 
<ludovic.rouss...@free.fr>.\n");
        printf("Copyright (C) 2003-2004 by Damien Sauveron 
<sauve...@labri.fr>.\n");
        printf("Report bugs to <pcsclite-mus...@lists.alioth.debian.org>.\n");
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/src/spy/pcsc-spy 
new/pcsc-lite-1.8.25/src/spy/pcsc-spy
--- old/pcsc-lite-1.8.24/src/spy/pcsc-spy       2018-07-15 22:51:16.000000000 
+0200
+++ new/pcsc-lite-1.8.25/src/spy/pcsc-spy       2019-03-24 13:43:26.000000000 
+0100
@@ -855,13 +855,16 @@
 
         start_time = int(sec) + int(usec) / 1000000.
 
+        lastest_result = ""
         while line != '':
             previous_thread = thread
             (thread, tail) = line.split('@')
+            if "<" in tail:
+                lastest_result = tail
 
             # in case the thread changes
             if previous_thread != thread:
-                # schedule the other thread so it has time to emtpy its
+                # schedule the other thread so it has time to empty its
                 # queue
                 time.sleep(.01)
 
@@ -889,13 +892,9 @@
         for thread in threads:
             threads[thread].join()
 
-        try:
-            (code, rv, sec, usec) = _parse_rv(tail)
-            end_time = sec + usec / 1000000.
-            total_time = end_time - start_time
-        except ValueError:
-            # we have no return value of the latest PC/SC call
-            total_time = -1
+        (code, rv, sec, usec) = _parse_rv(lastest_result)
+        end_time = sec + usec / 1000000.
+        total_time = end_time - start_time
 
         # compute some statistics
         thread_n = 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/src/winscard.c 
new/pcsc-lite-1.8.25/src/winscard.c
--- old/pcsc-lite-1.8.24/src/winscard.c 2018-10-12 10:46:31.000000000 +0200
+++ new/pcsc-lite-1.8.25/src/winscard.c 2019-03-24 13:43:26.000000000 +0100
@@ -583,9 +583,6 @@
                 */
                RFSetReaderEventState(rContext, SCARD_RESET);
 
-               /*
-                * Currently pcsc-lite keeps the card powered constantly
-                */
                dwAtrLen = sizeof(rContext->readerState->cardAtr);
                if (SCARD_RESET_CARD == dwInitialization)
                        rv = IFDPowerICC(rContext, IFD_RESET,
@@ -1137,9 +1134,6 @@
        {
                DWORD dwAtrLen;
 
-               /*
-                * Currently pcsc-lite keeps the card always powered
-                */
                dwAtrLen = sizeof(rContext->readerState->cardAtr);
                if (SCARD_RESET_CARD == dwDisposition)
                        rv = IFDPowerICC(rContext, IFD_RESET,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/src/winscard_clnt.c 
new/pcsc-lite-1.8.25/src/winscard_clnt.c
--- old/pcsc-lite-1.8.24/src/winscard_clnt.c    2018-09-15 18:16:28.000000000 
+0200
+++ new/pcsc-lite-1.8.25/src/winscard_clnt.c    2019-03-24 13:43:26.000000000 
+0100
@@ -595,7 +595,7 @@
                rv = MessageSendWithHeader(CMD_VERSION, dwClientID, 
sizeof(veStr),
                        &veStr);
                if (rv != SCARD_S_SUCCESS)
-                       return rv;
+                       goto cleanup;
 
                /* Read a message from the server */
                rv = MessageReceive(&veStr, sizeof(veStr), dwClientID);
@@ -603,14 +603,18 @@
                {
                        Log1(PCSC_LOG_CRITICAL,
                                "Your pcscd is too old and does not support 
CMD_VERSION");
-                       return SCARD_F_COMM_ERROR;
+                       rv = SCARD_F_COMM_ERROR;
+                       goto cleanup;
                }
 
                Log3(PCSC_LOG_INFO, "Server is protocol version %d:%d",
                        veStr.major, veStr.minor);
 
                if (veStr.rv != SCARD_S_SUCCESS)
-                       return veStr.rv;
+               {
+                       rv = veStr.rv;
+                       goto cleanup;
+               }
        }
 
 again:
@@ -625,7 +629,7 @@
                sizeof(scEstablishStruct), (void *) &scEstablishStruct);
 
        if (rv != SCARD_S_SUCCESS)
-               return rv;
+               goto cleanup;
 
        /*
         * Read the response from the server
@@ -634,10 +638,13 @@
                dwClientID);
 
        if (rv != SCARD_S_SUCCESS)
-               return rv;
+               goto cleanup;
 
        if (scEstablishStruct.rv != SCARD_S_SUCCESS)
-               return scEstablishStruct.rv;
+       {
+               rv = scEstablishStruct.rv;
+               goto cleanup;
+       }
 
        /* check we do not reuse an existing hContext */
        if (NULL != SCardGetContextTH(scEstablishStruct.hContext))
@@ -653,6 +660,11 @@
        rv = SCardAddContext(*phContext, dwClientID);
 
        return rv;
+
+cleanup:
+       ClientCloseSession(dwClientID);
+
+       return rv;
 }
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pcsc-lite-1.8.24/src/winscard_svc.c 
new/pcsc-lite-1.8.25/src/winscard_svc.c
--- old/pcsc-lite-1.8.24/src/winscard_svc.c     2018-10-12 11:06:13.000000000 
+0200
+++ new/pcsc-lite-1.8.25/src/winscard_svc.c     2019-03-24 13:43:26.000000000 
+0100
@@ -896,9 +896,7 @@
                        {
                                /*
                                 * if the card is locked by someone else we do 
not reset it
-                                * and simulate a card removal
                                 */
-                               rv = SCARD_W_REMOVED_CARD;
 
                                /* decrement card use */
                                (void)SCardDisconnect(hCard, SCARD_LEAVE_CARD);


Reply via email to