problem with DirectoryServices
problem with DirectoryServices
- Subject: problem with DirectoryServices
- From: Robert Kells <email@hidden>
- Date: Fri, 15 Aug 2008 15:32:41 -0700
I am having trouble with some DirectoryServices calls.
I have written a test app using an xcode template cmd-line utility/
coreFoundation tool.
Basically, I want to mimic some cmd-line dscl with the corresponding
ds* api calls,
with the goal of unpacking RecordName, RealName, and UniqueID for each
user
dscl localhost -list /Search/Users
dscl localhost -read /Search/Users/bob RecordName RealName UniqueID
So I issue some ds* calls from my testcode...
dsOpenDirService
dsDataBufferAllocate
/* this code works in that the "/Search" node is found; use
predefined constant instead of my own path */
lvDirStatus = dsFindDirNodes( gpDSRef, lpDataBuff2, NULL,
eDSAuthenticationSearchNodeName, &nodeCount, &context );
dsGetDirNodeName
dsOpenDirNode
/* this code does not work with my own path */
/* I've tried many permutation of the path, including /NetInfo/
DefaultLocalNode/Search/Users */
nodeName = dsBuildFromPath( gpDSRef, "/Search/Users", "/" );
lvDirStatus = dsFindDirNodes( gpDSRef, lpDataBuff, nodeName,
eDSiExact, &nodeCount, &context );
/* once I find the node that contains the user-list - I'll issue
the following calls, among others */
dsBuildListFromStrings
dsGetRecordList
How do I get to the node with the user-list?
I don't want to use any cocoa wrappers for the ds* calls.
Haven't been able to find useful documentation that clearly shows path
values sent to dsBuildFromPath or dsFindDirNodes.
I appreciate any suggestions, and apologize if I've chosen the wrong
mailing list.
Thanks...bob kells
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden