FROM : Louis C. Sacha
DATE : Wed Oct 06 22:06:39 2004
Hello...
Generally you wouldn't want to do this type of thing with
AuthorizationExecuteWithPrivileges(), and would instead create a
setuid helper tool that would check authorization once and then
perform the necessary actions.
There are C functions available that do the same thing as the chown
and chmod command line tools which you can use in your helper tool.
In the terminal type 'man 2 chown' and 'man 2 chmod' to get more info.
For more info about creating a setuid helper tool, check out the
sample code example "AuthSample" that Apple has available at the
developer.apple.com site.
Hope that helps,
Louis
>Is there some sort of inherent limit on the number of times you can
>call AuthorizationExecuteWithPrivileges()?
>
>On my machine it always returns error -60031
>(errAuthorizationToolExecuteFailure) on iteration 20.
>
DATE : Wed Oct 06 22:06:39 2004
Hello...
Generally you wouldn't want to do this type of thing with
AuthorizationExecuteWithPrivileges(), and would instead create a
setuid helper tool that would check authorization once and then
perform the necessary actions.
There are C functions available that do the same thing as the chown
and chmod command line tools which you can use in your helper tool.
In the terminal type 'man 2 chown' and 'man 2 chmod' to get more info.
For more info about creating a setuid helper tool, check out the
sample code example "AuthSample" that Apple has available at the
developer.apple.com site.
Hope that helps,
Louis
>Is there some sort of inherent limit on the number of times you can
>call AuthorizationExecuteWithPrivileges()?
>
>On my machine it always returns error -60031
>(errAuthorizationToolExecuteFailure) on iteration 20.
>
| Related mails | Author | Date |
|---|---|---|
| Linea Tessile Srl | Sep 17, 12:37 | |
| Louis C. Sacha | Oct 6, 22:06 |






Cocoa mail archive

