From: Apple Date: Wed, 8 Feb 2006 18:13:37 +0000 (+0000) Subject: securityd-26674.tar.gz X-Git-Tag: v26674^0 X-Git-Url: https://git.saurik.com/apple/securityd.git/commitdiff_plain/83d7be6c07aea384047c325f3d401648671af0b4 securityd-26674.tar.gz --- diff --git a/securityd.xcode/project.pbxproj b/securityd.xcode/project.pbxproj index 8c2be87..769f610 100644 --- a/securityd.xcode/project.pbxproj +++ b/securityd.xcode/project.pbxproj @@ -838,7 +838,7 @@ ); buildSettings = { BUILD_VARIANTS = "normal debug"; - CURRENT_PROJECT_VERSION = 26232; + CURRENT_PROJECT_VERSION = 26674; FRAMEWORK_SEARCH_PATHS = "/usr/local/SecurityPieces/Frameworks /usr/local/SecurityPieces/Components/securityd $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; INSTALL_PATH = /usr/sbin; OPT_CPPXFLAGS = "$(OPT_CXFLAGS)"; diff --git a/src/pcscmonitor.cpp b/src/pcscmonitor.cpp index 63fa12b..833b1ba 100644 --- a/src/pcscmonitor.cpp +++ b/src/pcscmonitor.cpp @@ -364,6 +364,8 @@ PCSCMonitor::DeviceSupport PCSCMonitor::deviceSupport(const IOKit::Device &dev) { try { secdebug("scsel", "%s", dev.path().c_str()); + + // composite USB device with interface class if (CFRef cfInterface = dev.property("bInterfaceClass")) switch (IFDEBUG(uint32 clas =) cfNumber(cfInterface)) { case kUSBChipSmartCardInterfaceClass: // CCID smartcard reader - go @@ -376,11 +378,20 @@ PCSCMonitor::DeviceSupport PCSCMonitor::deviceSupport(const IOKit::Device &dev) secdebug("scsel", " interface class %ld is not a smartcard device", clas); return impossible; } + + // noncomposite USB device if (CFRef cfDevice = dev.property("bDeviceClass")) if (cfNumber(cfDevice) == kUSBVendorSpecificClass) { secdebug("scsel", " Vendor-specific device - possible match"); return possible; } + + // PCCard (aka PCMCIA aka ...) interface (don't know how to recognize a reader here) + if (CFRef ioName = dev.property("IOName")) + if (cfString(ioName).find("pccard", 0, 1) == 0) { + secdebug("scsel", " PCCard - possible match"); + return possible; + } return impossible; } catch (...) { secdebug("scsel", " exception while examining device - ignoring it");