Re: Authentication
Re: Authentication
- Subject: Re: Authentication
- From: Finlay Dobbie <email@hidden>
- Date: Sun, 22 Jul 2001 17:07:37 +0100
On Sunday, July 22, 2001, at 04:56 pm, Eric Peyton wrote:
NIAuthenticationPanel and the rest of NetInfoKit (NIAccess and
NIInterface) are now considered Private SPI. If you are using them,
you are doing so at your own risk and your application very well may
break in the future.
The Public API for Authorization is the security framework.
1) Why? They have never been private since they were first created, and
that's about 5 or 6 years, isn't it? I could be wrong, I never
experienced NeXT.
2) So delete the documentation in
/System/Library/PrivateFrameworks/NIInterface.framework/Versions/B/Resources/
English.lproj/Documentation and
/System/Library/PrivateFrameworks/NIAccess.framework/Versions/B/Resources/
English.lproj/Documentation
Both are linked to from /Developer/Documentation/Cocoa/Reference
The problem I was having was that Security.framework was not giving me
full root rights (i.e. it was euid 0 not uid 0), and I couldn't think of
any other way of doing it than piping the password from an
NIAuthenticationPanel to sudo. I could also have written a wrapper which
runs getuid(0), it looks like, or used security.framework to execute
sudo itself, but neither of those occurred to me.
Looks like the main reason for this is that Security.framework basically
sucks, as I have stated before. Well, only when it comes the
Authorization* commands, I guess. Is anybody at Apple working on
addressing this problem? The potential is there, but the implementation
is a bit screwy. Zombied processes, inability to control proceses
spawned, and there isn't even an objective c wrapper! pah.
-- Finlay