lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 06 Sep 2007 23:05:24 +0200
From:	Manuel Reimer <Manuel.Spam@...fuerspam.de>
To:	linux-kernel@...r.kernel.org
Subject:  Re: udev: Inconsistency between %b and %p?

Andreas Schwab wrote:
>> As I would prefer to use the USB device information (idVendor, idProduct)
>> to detect the device, I also tried this one:
>>
>> ATTRS{idVendor}=="0dda", ATTRS{idProduct}=="2005", SUBSYSTEM=="scsi",
>> ACTION=="add", PROGRAM+="/usr/bin/test.sh %b %p"
>>
>> Now this version returns the USB device ID ($NUM-$NUM) to the test script,
>> but the device path (%p) is still OK and still goes down up to the SCSI
>> device ID.
>>
>> Why does %b not return the SCSI device ID in the second rule?
> 
> Because ATTRS has matched the USB device, not the SCSI device.

Yes, that's right, but "SUBSYSTEM" matched the SCSI device...

If I use udevinfo, then this tool tells me:

| A rule to match, can be composed by the attributes of the device
| and the attributes from one single parent device.

So I thought, that I've matched the SCSI device now. To prove this, I 
just replaced "SUBSYSTEM=="scsi"" with "SUBSYSTEM=="usb"" and removed 
the "S" in the "ATTRS" of the above rule, and now, I get the USB-device 
in %b (as expected) and the path in %p only goes down up to the USB 
device ID.

So, if all rules match for the same device, then %b and %p are both 
pointing to this, right, device.

If I try to match, using one of the parent devices (using the "S" 
"extension" to the property names) and the device, to match to, itself, 
then the two are inconsistent. Then, %b holds the device name of the 
parent and %p holds the patch of the device, I want to match.

For me, this looks like a bug, or am I wrong?

Yours

Manuel

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ