openct broken by ubuntu udev setup

Bug #125054 reported by Andreas Jellinghaus
2
Affects Status Importance Assigned to Milestone
openct (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: openct

see bug #125052 for details how ubuntu udev setup broke openct.
this can be worked around by using the latest openct_usb.in file from
openct trunk or 0.6.12 release (out soon). this was fixed in openct svn
repository revision 984 and the fix can be downloaded from:
http://www.opensc-project.org/svn/openct/trunk/etc/openct_usb.in

this was tested on feisty, but I believe gutsy is affected as well and maybe also earlier
versions of ubuntu. please fix this issue in all versions affected (any please: soon!)

Revision history for this message
Andreas Jellinghaus (tolonuga) wrote :

this patch updates etc/openct_usb to the latest version from openct/trunk. this file was tested and works well on feisty,
and also should work well on gutsy (same openct package IIRC). please apply to both! (and edgy if that one has /dev/bus/usb bind-mounted to /proc/bus/usb too).

Revision history for this message
Andreas Jellinghaus (tolonuga) wrote :

please update openct to 0.6.14 for gutsy, so it will work.
0.6.14 contains all recent fixes for udev and hal setup.

note: if you run 2.6.22, make sure it is 2.6.22.6+ (fix for
drivers/usb/core/message.c included) before testing.
a kernel bug for this has been filed as well.

Revision history for this message
Andreas Jellinghaus (tolonuga) wrote :

I could finally test ubuntu gutsy and found out: it is broken,
hotplugging usb smart card reader does not work.

the problem is simple: /dev/bus/usb/* has device files in ubuntu gutsy,
but /proc/bus/usb is an empty directory. the kernel event gives us a file
name in /proc/bus/usb :(

the proper fix is to ask udev "which device file did you create for the parent event"
and then use that file name. this was implemented in openct 0.6.14 and works fine
and has been tested by a several people on several distribution.

so beside a changelog entry I replaced etc/openct_usb.in with the openct 0.6.14 file
and now it works fine. attached is a diff. could someone please compile/upload a new
openct package with this fix?

Revision history for this message
Andreas Jellinghaus (tolonuga) wrote :

this latest patch works on top of the current openct version in universe.
it is as small as it can get.
with it: plug in a usb smart card reader, works.
without it: plug in a usb smart card reader, does not work. you can work around with "sudo /etc/init.d/openct restart" but that
is very ugly, and not a good idea, if you want to login with smart cards (e.g. pam_p11 login module with opensc and openct).

the only file changed is the /lib/udev/openct_usb file used by the hotplug mechanism, only called for usb smart card readers,
so other packages cannot be affected by this fix.

the fix was necessary, because ubuntu dropped /proc/bus/usb which is historically mounted with usbfs.

diffstat:
 debian/changelog | 11 +++++++++++
 etc/openct_usb.in | 53 ++++++++++++++++++++++++++++++++++-------------------
 2 files changed, 45 insertions(+), 19 deletions(-)

the changed package builds, installs and upgrades fine, does not break packages depending on it (such as opensc).

Revision history for this message
Daniel Holbach (dholbach) wrote :

Needs motu-uvf ACK.

Revision history for this message
Scott Kitterman (kitterman) wrote :

If it does, ack, but it's just adding a patch. I'd say go for it dholbach as long as it's tested before upload.

Revision history for this message
Andreas Jellinghaus (tolonuga) wrote :

my self-build packages with this patch applied (and nothing else) work fine.
if you want to do more testing, I can help (without some usb smart card reader
or usb crypto token supported by openct there is not much you can test yourself).

Revision history for this message
Scott Kitterman (kitterman) wrote :

Subscribed UUS/Unsubbed motu-uvf as it's not an upstream version.

Changed in openct:
status: New → Confirmed
Changed in openct:
assignee: nobody → kitterman
status: Confirmed → In Progress
Revision history for this message
Scott Kitterman (kitterman) wrote :

Uploaded.

Changed in openct:
assignee: kitterman → nobody
importance: Undecided → Medium
status: In Progress → Fix Committed
Revision history for this message
Scott Kitterman (kitterman) wrote :

openct (0.6.11-3ubuntu1) gutsy; urgency=low

  [ Andreas Jellinghaus ]
  * Fix openct_udev script for Ubuntu (LP: #125054)

  [ Scott Kitterman ]
  * Correct Ubuntu revision number
  * Clean up debian/changelog entry
  * Change maintainer to MOTU

 -- Scott Kitterman <email address hidden> Sun, 14 Oct 2007 00:53:28 -0400

Changed in openct:
status: Fix Committed → Fix Released
Revision history for this message
Andreas Jellinghaus (tolonuga) wrote : Re: [Bug 125054] Re: openct broken by ubuntu udev setup

thanks a lot scott, I tested the new package and it works fine.

Regards, Andreas

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.