--enable-muscledropdir is no more supported by pcsc-lite since a long
time. So remove the line.
0 lines of code changed in 1 file:
--enable-usbdropdir=/usr/lib/pcsc/drivers is now the default value.
So remove the line.
0 lines of code changed in 1 file:
Default value of usbdropdir is now $prefix/lib/pcsc/drivers instead of
$prefix/pcsc/drivers
The new path is the path used on Debian (with prefix-/usr). So no need
to change the default value.
3 lines of code changed in 1 file:
Create empty directories used by drivers
Thanks to Kalev Lember for the patch
http://archives.neohapsis.com/archives/dev/muscle/2010-q3/0065.html
4 lines of code changed in 1 file:
Do not affect and check a variable on the same line
30 lines of code changed in 4 files:
reformat
1 lines of code changed in 1 file:
Get the value of rContext before its use. A simple call to
SCardTransmit() crashed with a NULL pointer.
30 lines of code changed in 1 file:
fix crash with empty config dir
Thanks to Kalev Lember for the patch
http://archives.neohapsis.com/archives/dev/muscle/2010-q3/0017.html
pcscd attempts to read uninitialized memory and free an invalid
pointer when its configuration directory is empty.
The patch fixes this by initializing reader_list to NULL.
==2658== Conditional jump or move depends on uninitialised value(s)
==2658== at 0x40A2EF: RFStartSerialReaders (readerfactory.c:1324)
==2658== by 0x40743F: main (pcscdaemon.c:522)
==2658== ==2658== Use of uninitialised value of size 8
==2658== at 0x40A2F5: RFStartSerialReaders (readerfactory.c:1327)
==2658== by 0x40743F: main (pcscdaemon.c:522)
==2658== ==2658== Conditional jump or move depends on uninitialised
value(s)
==2658== at 0x4C26D25: free (vg_replace_malloc.c:325)
==2658== by 0x40A404: RFStartSerialReaders (readerfactory.c:1348)
==2658== by 0x40743F: main (pcscdaemon.c:522)
==2658== ==2658== Invalid free() / delete / delete[]
==2658== at 0x4C26D72: free (vg_replace_malloc.c:325)
==2658== by 0x40A404: RFStartSerialReaders (readerfactory.c:1348)
==2658== by 0x40743F: main (pcscdaemon.c:522)
==2658== Address 0x4222148 is not stack'd, malloc'd or (recently)
free'd
--- pcsc-lite-1.6.1/src/readerfactory.c.orig2010-07-04
23:42:14.000000000 +0300
+++ pcsc-lite-1.6.1/src/readerfactory.configuration2010-07-04
23:42:23.000000000 +0300
@@ -1312,7 +1312,7 @@ void RFCleanupReaders(void)
#ifdef USE_SERIAL
int RFStartSerialReaders(const char *readerconf)
{
-readerconfSerialReader *reader_list;
+reader_listSerialReader *reader_list = NULL;
int i, rv;
/* remember the configuration filename for
* RFReCheckReaderConf() */
2 lines of code changed in 1 file:
more idiomatic sysconfdir usage
Thanks to Kalev Lember for the patch
http://archives.neohapsis.com/archives/dev/muscle/2010-q3/0015.html
> URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5060
> Log: set --sysconfdir=/etc/reader.conf.d so that we parse any file in
> this directory
>
> [...]
> - --sysconfdir=/etc \
> + --sysconfdir=/etc/reader.conf.d \
It's more common to set sysconfdir to /etc and have configure script
figure out the subdirectory. The configure script should always default
to sane values when no arguments are specified. The default value for
sysconfdir is /usr/local/etc; so the configure script should just append
/reader.conf.d to that. Right now if the user doesn't override
sysconfdir, pcsc will try to go through every .conf file in
/usr/local/etc, and I don't think anything good will come out of that.
I have a patch attached which should make it more idiomatic: default to
$sysconfdir/reader.conf.d directory.
6 lines of code changed in 3 files:
remove PCSCLITE_READER_CONFIG now useless
0 lines of code changed in 1 file:
main(): use PCSCLITE_CONFIG_DIR instead of PCSCLITE_READER_CONFIG to
use the directory configured using --sysconfdir=...
1 lines of code changed in 1 file:
set --sysconfdir=/etc/reader.conf.d so that we parse any file in this
directory
1 lines of code changed in 1 file:
DBGetReaderListDir(): add a log line when parsing a directory (containing
config files)
2 lines of code changed in 1 file:
RFCheckSharing(), RFLockSharing(), RFUnlockSharing() &
RFUnlockAllSharing(): add the READER_CONTEXT * rContext parameter to
avoid recomputing it internally (gain a few CPU cycles)
25 lines of code changed in 3 files: