Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS exception on Kernel Detach (FIXED) #88

Open
dmingram66 opened this issue Jul 26, 2023 · 0 comments
Open

MacOS exception on Kernel Detach (FIXED) #88

dmingram66 opened this issue Jul 26, 2023 · 0 comments

Comments

@dmingram66
Copy link

MacOS introduced a security control with BigSur which prevents un trusted developers from detaching the Kernel USB driver. The attached patch file implement the fix.

Please note that I have introduced a new dependency, from packaging import version , to allow a simple version test:

            if not sys.platform.startswith('darwin'):
                try:
                    self.device.detach_kernel_driver(0)
                except usb.core.USBError as e:
                    raise BlinkStickException("Could not detach kernel driver: %s" % str(e))
            elif version.parse(os.uname().release)<version.parse('20.0.0'):
                try:
                    self.device.detach_kernel_driver(0)
                except usb.core.USBError as e:
                    raise BlinkStickException("Could not detach kernel driver: %s" % str(e))

The attached file contains the patch

patch-diff.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant