On May 14, 2008, at 7:12 PM, Ron Aldrich wrote:

Hello Folks,

I'm trying to figure out where the API for the system's password entry dialog is defined.

In particular, I'm interested in using the dialog which is used by Disk Utility (i.e. diskimages-helper) to enter passwords.

Is there a public API for password entry dialogs? Or should I just roll my own?


What are you trying to do?

If you just need a dialog with a password field, NSSecureTextField is your friend (say, for example, to send over a secure channel on the network to log in to your network based service).

If you want to have that dialog that authenticates the user to allow them to perform tasks as root (or some other elevated privilege), you don't show that dialog - the authentication mechanism handles it. Look at AuthorizationExecuteWithPrivileges and friends.

Under no circumstances should you try to roll your own "well, lets ask for the root password using our own dialog, and then pass it to an NSTask invoking sudo with the dangerous thing that mortals aren't suppose to do".




Glenn Andreas                      [EMAIL PROTECTED]
 <http://www.gandreas.com/> wicked fun!
m.o.t.e.s. | minute object twisted environment simulation



_______________________________________________

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