Hi List,

I am getting back into Cocoa after a 2-3 year break and diving straight in to the Security Frameworks. I had some help a couple of weeks ago from this list (thanks Charles :-)) when trying to get the bannersample example working and am hoping for the same again.

In looking at the Security Framework documentation and reading this list it seems that the SFAuthorizationPluginView provided with 10.5 does exactly what I require, that is, add an extra field to the login screen. The sample code for this is called NameAndPassword but I cannot seem to get this working correctly.

Following the instructions the code is compiled and the resulting bundle installed in "/System/Library/CoreServices/ SecurityAgentPlugins/". I want to replace the login screen so I add a line to "/etc/authorization" to call the mechanism: <string>NameAndPassword:invoke</string>. This is placed just above the smartcard-sniffer entry.

I an invoke the mechanism either by using the Fast User Switching "Login Window..." menu option or running the AskForRight code fragment provided with the sample code in the readme.

Now the problem, the window is displayed but my password is never accepted, I have added a few strategically placed NSLogs and am sure that everything is correct but still no luck. After trying unsuccessfully, and hitting return a couple of times I am returned to the regular login window. So I guess the NameAndPassword UI is exiting and the next mechanism in "/etc/authorization" is run.

I have been through the code in an attempt to understand what is going on. There are two nib files, and which is used depends on whether the login window is displayed as a list of users or a name and password. There are lots of checks in the code to ensure that the correct nib is loaded, however, when enter or the login button is pressed we end up calling - (void)buttonPressed:(SFButtonType)inButtonType. This function gets the password from "mIPPasswordSecureTextField" regardless of the nib loaded, which looks like a bug to me as "mPPasswordSecureTextField" is the field used for the list of users login nib. So I tried changing the fields, but still the same problem.

Sorry for the long post, but I have been stuck on this for a while now and not sure how to proceed. Looking forward to your replies.


Regards,

Patrick



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to