lightdm-guest-session prevents launching pcscd on-demand

Bug #1329936 reported by Lauri Võsandi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lightdm (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On Ubuntu 12.04 the pcscd daemon is launched on demand by libpcsclite. I believe it relies on the setgid bit on /usr/sbin/pcscd for the process to gain proper rights to create /var/run/pcscd/pcscd.pid and /var/run/pcscd/pcscd.comm. Ubuntu guest account Apparmor profile prevents setgid bit taking action which means that under guest account it is not possible to use smartcards.

Running pcscd -f as guest user results in:

00000000 pcscdaemon.c:520:main() cannot create /var/run/pcscd/pcscd.pid: Permission denied
00000559 winscard_msg_srv.c:121:InitializeSocket() Unable to bind common socket: Permission denied
00000565 pcscdaemon.c:574:main() Error initializing pcscd.
00000581 pcscdaemon.c:658:clean_temp_files() Cannot remove /var/run/pcscd/pcscd.comm: No such file or directory
00000592 pcscdaemon.c:663:clean_temp_files() Cannot remove /var/run/pcscd/pcscd.pid: No such file or directory
00000604 pcscdaemon.c:658:clean_temp_files() Cannot remove /var/run/pcscd/pcscd.comm: No such file or directory
00000614 pcscdaemon.c:663:clean_temp_files() Cannot remove /var/run/pcscd/pcscd.pid: No such file or directory

As regular user it works as expected and card reader is recognized by opensc-tool -l

This bug is closely related to #1329923 and actually most of the nature of the problem is described there.

As a workaround I have reverted /etc/init.d/pcscd to pre 1.6.0 behaviour by commenting out exit 0 as the file itself suggests by running: sed -i -e 's/^exit 0$/#exit 0/' /etc/init.d/pcscd

This just means that the on-demand feature is disabled by launching pcscd during boot and everything works as expected

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lightdm (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.