https://bugzilla.novell.com/show_bug.cgi?id=438131
User sbrabec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=438131#c17
--- Comment #17 from Stanislav Brabec 2009-01-15 10:21:57 MST ---
While trying to set the stuff properly, I got totally confused. It works for
USB-to-serial converter based devices, but not for native CCID Smart Card
readers.
I have created upper mentioned policies and all needed files. Then I defined
testing rule for two devices. One of them is a generic USB-to-serial converter,
second one is a Smart Card reader.
For USB-to-serial, assigning capabilities work correctly and ACL is set, for
Smart Cart reader not only that ACL is not set, but also <append
key="info.capabilities" type="strlist">smart_card_reader</append> is ignored. I
see no obvious reason for this behavior.
My testing file:
/usr/share/hal/fdi/information/20thirdparty/70-test.fdi:
---------
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="info.subsystem" string="usb">
<match key="usb.vendor_id" int="Ox076b">
<match key="usb.product_id" int="0x3821">
<append key="info.capabilities"
type="strlist">smart_card_reader</append>
</match>
</match>
</match>
<match key="info.subsystem" string="usb">
<match key="usb.vendor_id" int="0x10c4">
<match key="usb.product_id" int="0xea60">
<append key="info.capabilities"
type="strlist">smart_card_reader</append>
</match>
</match>
</match>
</device>
</deviceinfo>
---------
Relevant output of lshal for serial device:
udi = '/org/freedesktop/Hal/devices/usb_device_10c4_ea60_0001'
info.linux.driver = 'usb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1d6b_1_0000_00_10_2'
(string)
info.product = 'CP210x Composite Device' (string)
info.subsystem = 'usb_device' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_10c4_ea60_0001' (string)
info.vendor = 'Cygnal Integrated Products, Inc.' (string)
linux.device_file = '/dev/bus/usb/003/037' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'usb' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:10.2/usb3/3-2' (string)
usb_device.bus_number = 3 (0x3) (int)
usb_device.can_wake_up = false (bool)
usb_device.device_class = 0 (0x0) (int)
usb_device.device_protocol = 0 (0x0) (int)
usb_device.device_revision_bcd = 256 (0x100) (int)
usb_device.device_subclass = 0 (0x0) (int)
usb_device.is_self_powered = false (bool)
usb_device.linux.device_number = 37 (0x25) (int)
usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:10.2/usb3/3-2'
(string)
usb_device.num_configurations = 1 (0x1) (int)
usb_device.num_ports = 0 (0x0) (int)
usb_device.product = 'CP210x Composite Device' (string)
usb_device.product_id = 60000 (0xea60) (int)
usb_device.serial = '0001' (string)
usb_device.speed = 12.0 (12) (double)
usb_device.vendor = 'Cygnal Integrated Products, Inc.' (string)
usb_device.vendor_id = 4292 (0x10c4) (int)
usb_device.version = 1.1 (1.1) (double)
udi = '/org/freedesktop/Hal/devices/usb_device_10c4_ea60_0001_if0'
access_control.file = '/dev/bus/usb/003/037' (string)
access_control.type = 'smart-card-reader' (string)
info.callouts.add = {'hal-acl-tool --add-device'} (string list)
info.callouts.remove = {'hal-acl-tool --remove-device'} (string list)
info.capabilities = {'smart_card_reader', 'access_control'} (string list)
info.linux.driver = 'cp2101' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_10c4_ea60_0001'
(string)
info.product = 'USB Vendor Specific Interface' (string)
info.subsystem = 'usb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_10c4_ea60_0001_if0'
(string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'usb' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:10.2/usb3/3-2/3-2:1.0'
(string)
usb.bus_number = 3 (0x3) (int)
usb.can_wake_up = false (bool)
usb.device_class = 0 (0x0) (int)
usb.device_protocol = 0 (0x0) (int)
usb.device_revision_bcd = 256 (0x100) (int)
usb.device_subclass = 0 (0x0) (int)
usb.interface.class = 255 (0xff) (int)
usb.interface.number = 0 (0x0) (int)
usb.interface.protocol = 0 (0x0) (int)
usb.interface.subclass = 0 (0x0) (int)
usb.is_self_powered = false (bool)
usb.linux.device_number = 37 (0x25) (int)
usb.linux.sysfs_path =
'/sys/devices/pci0000:00/0000:00:10.2/usb3/3-2/3-2:1.0' (string)
usb.num_configurations = 1 (0x1) (int)
usb.num_ports = 0 (0x0) (int)
usb.product = 'USB Vendor Specific Interface' (string)
usb.product_id = 60000 (0xea60) (int)
usb.serial = '0001' (string)
usb.speed = 12.0 (12) (double)
usb.vendor = 'Cygnal Integrated Products, Inc.' (string)
usb.vendor_id = 4292 (0x10c4) (int)
usb.version = 1.1 (1.1) (double)
udi = '/org/freedesktop/Hal/devices/usb_device_10c4_ea60_0001_if0_serial_usb_0'
access_control.file = '/dev/ttyUSB0' (string)
access_control.type = 'modem' (string)
info.callouts.add = {'hal-acl-tool --add-device'} (string list)
info.callouts.remove = {'hal-acl-tool --remove-device'} (string list)
info.capabilities = {'serial', 'access_control'} (string list)
info.category = 'serial' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_10c4_ea60_0001_if0'
(string)
info.product = 'CP210x Composite Device' (string)
info.subsystem = 'tty' (string)
info.udi =
'/org/freedesktop/Hal/devices/usb_device_10c4_ea60_0001_if0_serial_usb_0'
(string)
linux.device_file = '/dev/ttyUSB0' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'tty' (string)
linux.sysfs_path =
'/sys/devices/pci0000:00/0000:00:10.2/usb3/3-2/3-2:1.0/ttyUSB0/tty/ttyUSB0'
(string)
serial.device = '/dev/ttyUSB0' (string)
serial.originating_device =
'/org/freedesktop/Hal/devices/usb_device_10c4_ea60_0001_if0' (string)
serial.port = 0 (0x0) (int)
serial.type = 'usb' (string)
As you can see, capabilities and acl was correctly assigned.
And here is the output with Smart Card reader:
udi = '/org/freedesktop/Hal/devices/usb_device_76b_3821_noserial'
info.linux.driver = 'usb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1d6b_1_0000_00_10_2'
(string)
info.product = 'CardMan 3821' (string)
info.subsystem = 'usb_device' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_76b_3821_noserial'
(string)
info.vendor = 'OmniKey AG' (string)
linux.device_file = '/dev/bus/usb/003/038' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'usb' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:10.2/usb3/3-1' (string)
usb_device.bus_number = 3 (0x3) (int)
usb_device.can_wake_up = false (bool)
usb_device.device_class = 0 (0x0) (int)
usb_device.device_protocol = 0 (0x0) (int)
usb_device.device_revision_bcd = 1536 (0x600) (int)
usb_device.device_subclass = 0 (0x0) (int)
usb_device.is_self_powered = false (bool)
usb_device.linux.device_number = 38 (0x26) (int)
usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:10.2/usb3/3-1'
(string)
usb_device.num_configurations = 1 (0x1) (int)
usb_device.num_ports = 0 (0x0) (int)
usb_device.product = 'CardMan 3821' (string)
usb_device.product_id = 14369 (0x3821) (int)
usb_device.speed = 12.0 (12) (double)
usb_device.vendor = 'OmniKey AG' (string)
usb_device.vendor_id = 1899 (0x76b) (int)
usb_device.version = 2.0 (2) (double)
udi = '/org/freedesktop/Hal/devices/usb_device_76b_3821_noserial_if0'
info.parent = '/org/freedesktop/Hal/devices/usb_device_76b_3821_noserial'
(string)
info.product = 'USB Chip/Smartcard Interface' (string)
info.subsystem = 'usb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_76b_3821_noserial_if0'
(string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'usb' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:10.2/usb3/3-1/3-1:1.0'
(string)
usb.bus_number = 3 (0x3) (int)
usb.can_wake_up = false (bool)
usb.device_class = 0 (0x0) (int)
usb.device_protocol = 0 (0x0) (int)
usb.device_revision_bcd = 1536 (0x600) (int)
usb.device_subclass = 0 (0x0) (int)
usb.interface.class = 11 (0xb) (int)
usb.interface.number = 0 (0x0) (int)
usb.interface.protocol = 0 (0x0) (int)
usb.interface.subclass = 0 (0x0) (int)
usb.is_self_powered = false (bool)
usb.linux.device_number = 38 (0x26) (int)
usb.linux.sysfs_path =
'/sys/devices/pci0000:00/0000:00:10.2/usb3/3-1/3-1:1.0' (string)
usb.num_configurations = 1 (0x1) (int)
usb.num_ports = 0 (0x0) (int)
usb.product = 'USB Chip/Smartcard Interface' (string)
usb.product_id = 14369 (0x3821) (int)
usb.speed = 12.0 (12) (double)
usb.vendor = 'OmniKey AG' (string)
usb.vendor_id = 1899 (0x76b) (int)
usb.version = 2.0 (2) (double)
As you can see, second item matches the upper mentioned FDI. Not only that ACL
are not created, but also info.capabilities does not exist there.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.