Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pcscd issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
ericrhenry
n00b
n00b


Joined: 02 Jul 2009
Posts: 39
Location: Bethesda, MD

PostPosted: Fri Jan 11, 2019 2:09 pm    Post subject: pcscd issue Reply with quote

I completed an install of various facilities to work with SmartCards on a new laptop. This was pretty much identical to a several-years-old install on another laptop (from the same manufacturer, FWIW). Included sys-apps/pcsc-lite, sys-apps/pcsc-tools, app-crypt/ccid, dev-libs/opensc, and perhaps a few others. This install works like a champ on the old laptop; starting /etc/init.d/pcscd lets me run pcsc_scan successfully, read certificates into a browser, etc.

The new installation is a bit more problematic. After starting the daemon, pcsc_scan hangs waiting for detection of the first card reader, opensc-tool fails to detect the reader, etc. However, lsusb shows the reader, identified as

SCM Microsystems, Inc., SCR331-LC1/SCR3310 SmartCard Reader

Moreover, instead running the daemon in the foreground from a terminal using "pcscd -a -d -f" properly detects the reader and registers card events. On a hunch, while doing this I also ran pcsc_scan in a separate terminal, and it worked just fine. This suggested that the method of starting the daemon somehow affected its functionality. When started through OpenRC, syslog shows a string of errors involving failure to open a port and others, culminating in the driver failing to init.

On a whim, I took a look at the /etc/init.d/pcscd file, and commented out the line

start_stop_daemon_args="--user pcscd:pcscd"

Upon startup, the daemon functioned correctly, with pcsc_scan detecting the card, certificates being read, etc.

I could stop here and just keep this tweak as a work-around, but I am not comfortable "breaking" one of the features of the install (running the daemon as user 'pcscd') in order to get it to work. At least I would like to know what this work-around is actually working around. Every aspect of the two installs that I have been able to probe appear to be identical: The pcscd user and group both exist, the udev rule sets for the service are identical, drivers are obviously available in both cases, etc. So I am left with some kind of possible permissions issue, beyond which I'm out of ideas.

If anyone can suggest something else to check, I would appreciate it.

Eric
Back to top
View user's profile Send private message
harvin
n00b
n00b


Joined: 16 May 2019
Posts: 2

PostPosted: Thu May 16, 2019 4:02 pm    Post subject: pcscd issue Reply with quote

Hi all,

I have exactly the same issue.

But I discovered this did not happen with the old kernel branches (I obviously did not test all the kernel branches).

So, with the 4.9.x Gentoo kernels, my smartcard reader works fine.
But the same configuration with the 4.14.x and 4.19.x Gentoo kernels (and probably newer kernel), I have the trouble described by ericrhenry.

I hope it will help to fix this issue...

Vincent
Back to top
View user's profile Send private message
mega_flow
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jun 2016
Posts: 95
Location: Belgium

PostPosted: Fri May 17, 2019 4:11 am    Post subject: Reply with quote

Hi the install log off sys-apps/pcsc-lite say
Quote:
Starting from version 1.6.5, pcsc-lite will start as user nobody in
the pcscd group, to avoid running as root.

This also means you need the newest drivers available so that the
devices get the proper owner.

Furthermore, a conf.d file is no longer installed by default, as
the default configuration does not require one. If you need to
pass further options to pcscd, create a file and set the
EXTRA_OPTS variable.

Hotplug support is provided by udev rules; you only need to tell
the init system to hotplug it, by setting this variable in
/etc/rc.conf:
rc_hotplug="pcscd"

this work fine on my system
_________________
default/linux/amd64/23.0/no-multilib/gnome/systemd gnome:46
Back to top
View user's profile Send private message
harvin
n00b
n00b


Joined: 16 May 2019
Posts: 2

PostPosted: Wed May 22, 2019 5:28 pm    Post subject: [SOLVED] pcscd issue Reply with quote

Hi,

Solved with :
Code:
# emerge -1u linux-headers


Vincent
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum