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

Sending data from kext to user space synchronously #3

Open
leochou0729 opened this issue Jul 23, 2019 · 1 comment
Open

Sending data from kext to user space synchronously #3

leochou0729 opened this issue Jul 23, 2019 · 1 comment

Comments

@leochou0729
Copy link

Hello,
Thank you for writing a so great framework. I'm a new MacOS developer. I'm wondering if there is a way to send data from kext to user space daemon and wait there for response. My Kauth callback function needs some user space daemon processing to check whether a file open operation should be denied. I'd like to use the Kernel Control API because it's powerful as well as easy to understand. But according to documentation, ctl_enqueuedata() just puts data in a queue and return immediately. The use space daemon needs to call recv() to get the data. I have no idea how I can do to wait for response(for example, suspend the kernel thread by calling sleep() and wake up when I receive data). Could you please give me some suggestions? Thanks!

@leochou0729
Copy link
Author

By the way, when I change DEFAULT_SETTING to "add com.apple.kauth.vnode", the console.app cannot show any logs. Could you share how I can switch the vnode listener on? Thanks!

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