Re: Problems with netinfo/ni.h
Re: Problems with netinfo/ni.h
- Subject: Re: Problems with netinfo/ni.h
- From: Kyle Moffett <email@hidden>
- Date: Mon, 15 Jul 2002 20:08:59 -0400
On Monday, July 15, 2002, at 06:50 PM, Finlay Dobbie wrote:
>
On Monday, July 15, 2002, at 11:39 PM, Kyle Moffett wrote:
>
>
>> I think you should probably be using the Directory Services API, not
>
>> libinfo. Not sure, though.
>
>
>
> Directory Services only handles databases that are above the
>
> current computer,
>
>
Incorrect.
See this page:
http://developer.apple.com/techpubs/macosx/Networking/DirectoryServices/DirServ-5.
html#pgfId-3834
Find the lines:
/NetInfo/root/AppleMarketing
/NetInfo/root/AppleEngineering
/NetInfo/root/ApplePublications
/LDAPv2/Public
/LDAPv2/Private
From the way this is laid out, I can see that the actual directory
services
plugin can only operate with ni databases in the current tree. The
'root'
node with other nodes below it. The actual databases can simply not
be organized into a tree at all.
At my site, I have several databases
that I use for testing/backup so if I screw up my current database I can
just use nidump/niload to restore it. Databases are local@localhost,
backup@localhost, and network@localhost.
My Ni tree:
/NetInfo/root - network@localhost
/NetInfo/root/mysystem - local@localhost
/NetInfo/root/othersystem - local@otherhost
backup@localhost does not show up at all, because it is not in the tree.
That does not mean I don't need to access it or that I shouldn't be able
to.
I run 'nidump -t -r / backup@localhost | niload -t -r / local@localhost'
to fix
my local db when I screw it up. DirectoryServices can't do this. Also,
if
I open a higher level domain with the NI Manager it authenticates only
with that higher level domain, whereas with DS, the lower level domain
would override it, disallowing me privilages to the higher domain,
because the account is in a lower one.
>
> and does not do writing easily (at all?)
>
>
I think it does do writing.
In any case, it's not as easy because it needs to be cross compatible
with other directory services.
>
>
> Both niutil and Netinfo Manager link into
>
> /System/Library/PrivateFrameworks/NetInfo.framework
>
> and NetInfo Manager links into a few other Private Frameworks
>
> as well (I've tried linking them for the needed symbols too.)
>
>
NIAccess has been "superseded" by Directory Services. The NetInfo
>
plugin for Directory Services uses NetInfo.framework, I think, and when
>
I was inquiring some months back I was directed to DS to manipulate the
>
NI database.
I was not using NIAccess.framework or NetInfo.framework, I only tried
them to see if the symbols were in there. Then I figured out that PB
links in the symbols correctly, so I used that. I am not using anything
private. I wrote my own routines based on the source for niutil, which
only uses NetInfo.framework for some utility routines that I don't need.
>
--
>
Finlay Dobbie
>
email@hidden
Kyle Moffett
_______________________________________________
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.