Re: Authenthicate only once
Re: Authenthicate only once
- Subject: Re: Authenthicate only once
- From: OL&L Dev 2 <email@hidden>
- Date: Wed, 21 Jan 2004 00:55:30 -0800
See the Apple technote "Authorization for Everyone" updated for Mac
OS 10.3 for using cached credentials to avoid the problem.
James
Orbital Launch & Lift
http://www.orbitallaunch.com
At 5:20 PM -0800 1/20/04, Nick Zitzmann wrote:
On Jan 20, 2004, at 4:55 AM, Vincent Pottier wrote:
My problem is: each time I want to add an ipfw rule, an administrator
password is requiered, i would like to know how to implemente those
method without requering an password or requiering a password only
once.
Try pre-autorizing the AuthorizationRef using
AuthorizationCopyRights() and the following flags:
kAuthorizationFlagDefaults, kAuthorizationFlagPreAuthorize,
kAuthorizationFlagInteractionAllowed, and
kAuthorizationFlagExtendRights.
Then it will ask once and retain those rights for several minutes.
After that time, though, the rights will expire and AEWP() will ask
for a password again... After re-entering the password, the rights
will last for several more minutes, and the cycle repeats. It's
certainly preferable to entering the password every time...
Nick Zitzmann
<http://seiryu.home.comcast.net/>
<http://www.freshlysqueezedsoftware.com/>
S/MIME signature available upon request
UNIX: Where /sbin/init is Job #1.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.