tags:

views:

290

answers:

3
A: 

I think if you give your app path in the 1st arg:

execl(authopenPath,
      "app path", // <--
      "-stdoutpipe",
      [self.device.devicePath fileSystemRepresentation],
      NULL);

the dialog will show:

"app name requires that you type your password"

najmeddine
The last time I tried this it didn't work. Maybe I did something wrong. This has been a known security hole: http://alastairs-place.net/archives/000079.html , maybe it works using the correct path
Georg
It's not working, just tried it. (Mac OS X 10.6)
Georg
A: 

The simple truth seems to be that it's not yet possible to do this.

Georg
A: 

You need to be looking directly at the security framework, introduced in 10.4, I think, and been the main authorization source since 10.5. OSX still works within PAM (like Linux), but /etc/authorization now supersedes this. Apple does have one or two samples of code on how you could pragmatically create a class/entry for someone to authorize themselves against (or preauthorize/be preauthorized like folks who are allowed to print).

Andrew
I'm already looking at the security framework. But how do I pre-authorize authopen?
Georg