Skip navigation.
 
mlRe: Password entry dialog
FROM : glenn andreas
DATE : Thu May 15 18:29:54 2008

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_removed>
  <http://www.gandreas.com/> wicked fun!
m.o.t.e.s. | minute object twisted environment simulation

Related mailsAuthorDate
mlPassword entry dialog Ron Aldrich May 15, 02:12
mlRe: Password entry dialog Michael Vannorsdel May 15, 18:25
mlRe: Password entry dialog glenn andreas May 15, 18:29
mlRe: Password entry dialog Jean-Daniel Dupas May 15, 18:32
mlRe: Password entry dialog Jack Repenning May 15, 18:38
mlRe: Password entry dialog Ron Aldrich May 15, 23:17
mlRe: Password entry dialog Jean-Daniel Dupas May 15, 23:43