Re: Password entry dialog
Re: Password entry dialog
- Subject: Re: Password entry dialog
- From: glenn andreas <email@hidden>
- Date: Thu, 15 May 2008 11:29:54 -0500
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@hidden
<http://www.gandreas.com/> wicked fun!
m.o.t.e.s. | minute object twisted environment simulation
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden