• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
problem with DirectoryServices
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Context and the drawing of NSImages
  • Next by Date: RE: Threading problem using AsyncSocket
  • Previous by thread: Context and the drawing of NSImages
  • Next by thread: Core Data, xcdatamodel
  • Index(es):
    • Date
    • Thread