]> git.saurik.com Git - apple/securityd.git/commitdiff
securityd-26674.tar.gz v26674
authorApple <opensource@apple.com>
Wed, 8 Feb 2006 18:13:37 +0000 (18:13 +0000)
committerApple <opensource@apple.com>
Wed, 8 Feb 2006 18:13:37 +0000 (18:13 +0000)
securityd.xcode/project.pbxproj
src/pcscmonitor.cpp

index 8c2be87590828609f440bd6a2bd811bb21345b97..769f610cfeadf5a5b78a836bd229bd6a2dca70ad 100644 (file)
                        );
                        buildSettings = {
                                BUILD_VARIANTS = "normal debug";
                        );
                        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)";
                                FRAMEWORK_SEARCH_PATHS = "/usr/local/SecurityPieces/Frameworks /usr/local/SecurityPieces/Components/securityd $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks";
                                INSTALL_PATH = /usr/sbin;
                                OPT_CPPXFLAGS = "$(OPT_CXFLAGS)";
index 63fa12b93645b9f284d6c100ac93916e3906b22a..833b1ba672bd170193f7cf737fb6b9f12f37e3b0 100644 (file)
@@ -364,6 +364,8 @@ PCSCMonitor::DeviceSupport PCSCMonitor::deviceSupport(const IOKit::Device &dev)
 {
        try {
                secdebug("scsel", "%s", dev.path().c_str());
 {
        try {
                secdebug("scsel", "%s", dev.path().c_str());
+
+               // composite USB device with interface class
                if (CFRef<CFNumberRef> cfInterface = dev.property<CFNumberRef>("bInterfaceClass"))
                        switch (IFDEBUG(uint32 clas =) cfNumber(cfInterface)) {
                        case kUSBChipSmartCardInterfaceClass:           // CCID smartcard reader - go
                if (CFRef<CFNumberRef> cfInterface = dev.property<CFNumberRef>("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;
                        }
                                secdebug("scsel", "  interface class %ld is not a smartcard device", clas);
                                return impossible;
                        }
+
+               // noncomposite USB device
                if (CFRef<CFNumberRef> cfDevice = dev.property<CFNumberRef>("bDeviceClass"))
                        if (cfNumber(cfDevice) == kUSBVendorSpecificClass) {
                                secdebug("scsel", "  Vendor-specific device - possible match");
                                return possible;
                        }
                if (CFRef<CFNumberRef> cfDevice = dev.property<CFNumberRef>("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<CFStringRef> ioName = dev.property<CFStringRef>("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");
                return impossible;
        } catch (...) {
                secdebug("scsel", "  exception while examining device - ignoring it");