Hello Apple Developer Support and Community,
We are currently working on a project that involves developing a custom Open Directory module (ODModule) for macOS. We searched extensively for official Apple documentation on how to develop such modules. Unfortunately, we have only found the following high-level introduction:
https://developer.apple.com/library/archive/releasenotes/NetworkingInternetWeb/RN_OpenDirectory/chapters/chapter-1.xhtml.html
Aside from this brief overview, we have not been able to locate any detailed technical documentation that would help us understand the structure, lifecycle, APIs, or integration points of ODModules.
Could you please advise:
Is there any more detailed or internal documentation available regarding ODModule development?
If so, is there a formal way to request access to it?
We would greatly appreciate any guidance or direction you can provide.
Thank you in advance!
Best regards,
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have created an OpenDirectory module based on the template and docs here: https://developer.apple.com/library/archive/releasenotes/NetworkingInternetWeb/RN_OpenDirectory/chapters/chapter-1.xhtml.html
After I copy my module in place and I set my module's configuration (see Configuration APIs section), my module does not get loaded. Currently the way I am able to start/reload it is sending a TERM signal to "opendirectoryd". (Launchctl refuses to stop it.) Then launchd restarts it, and my module gets started fine. Problem is that on some macOS this leads to system inresponsiveness for long time (even minutes).
I have tried HUP signal, odutil reset cache etc, they do not help, my module does not get recognized.
Is there a recommended way how to notify opendirectoryd about a new module?
Repro: My example module can be found here: https://www.dropbox.com/scl/fi/qb8pa100yy56n5hangad0/MyODModule-250527-131702.tar.gz?rlkey=m96vb1rrxc6hml878jn64ybc8&st=h22tl4cy&dl=0
To reproduce the behaviour, uncomment line 12 in register_odmodule.sh: "/usr/bin/killall opendirectoryd", and compile and install the module with
"make && sudo make install". And observe that it does not get loaded. Then "killall opendirectoryd", and observe that it got loaded.
(To test for loaded or not, you can read on the node it creates with dscl: "dscl /MyExample -list /", or just see that it is not started as a process with "ps").
Thanks for any help in advance!
With macOS 15, and DSPlugin support removal we searched for an alternative method to be able to inject users/groups
into the system dynamically. We tried to write an OpenDirectory XPC based module based on the documentation and
XCode template which can be found here: https://developer.apple.com/library/archive/releasenotes/NetworkingInternetWeb/RN_OpenDirectory/chapters/chapter-1.xhtml.html
It is more or less working, until I restart the computer: then macOS kernel panics 90% of the time. When the panic occurs, our code
does not seem to get run at all, I only see my logs in the beginning of main() when the machine successfully starts.
I have verified this also by logging to file.
Also tried replacing the binary with eg a shell script, or a "return 0" empty main function, that also triggers the panic.
But, if I remove my executable (from /Library/OpenDirectory/Modules/com.quest.vas.xpc/Contents/MacOS/com.quest.vas),
that saves the day always, macOS boots just fine.
Do you have an idea what can cause this behavior? I can share the boot logs for the boot loops and/or panic file.
Do you have any other way (other than OpenDirectory module) to inject users/groups into the system dynamically nowadays? (MDM does not seem a viable option for us)