How to install the plugin for Mac OS X Security Auth?

I used Apple's NameAndPassword Auth plug-in sample code to create my own simple authentication method, but I can't figure out how to install it!

I followed the details in the NullAuthPlugin sample README , and the plugin seems to be in its place correctly, but it does not work. In fact, I cannot get the NameAndPassword sample application to work.

To test, I log out (I also tried to reboot) from Mac OS, and then log back in. It asks for my password, as usual, but after clicking the "enter" button, the screen turns blue, as usual, to log in, but then I return to the log-in screen. This cycle continues every time I try to log in.

Does anyone have any Mac OS security experience and can give me more details on how to properly edit "/ etc / authorization"? What is the correct format for adding a plugin to it and are there any general problems with this kind of development that I could fall into?

I am using code on Mac OS 10.6.6. The code is beautifully built without errors, warnings, etc.

+4
source share
1 answer

Probable problem: NameAndPassword documents are old and say that you put the package in the wrong directory. Try / Library / Security / SecurityAgentPlugins / for MacOS 10.5 +

If this does not solve your problem, look at /var/log/debug.log for "Initial Login Security Agent" and see what happens after that.

Note that NameAndPassword does not work in Lion 10.7. It is not clear to me whether SFAuthorizationPluginView can be called during the login process. UI-less plugins, such as the NullAuthPlugin example, still work.

This Apple Tech note has a more detailed description of how to make this stuff work, including how the policy database (/ etc / authorization): http://developer.apple.com/library/mac/#technotes/tn2228 /_index.html

The Auth plugin API docs also describe how this works: http://developer.apple.com/library/mac/#documentation/Security/Reference/AuthorizationPluginRef/Reference/reference.html

+2
source

Source: https://habr.com/ru/post/1339431/


All Articles