Re: Gah! Any real world Open Directory examples?
Re: Gah! Any real world Open Directory examples?
- Subject: Re: Gah! Any real world Open Directory examples?
- From: "Jason Townsend" <email@hidden>
- Date: Fri, 23 Mar 2007 09:18:54 -0700
If all you need is the shell, you could consider using getpwnam().
char *shell;
struct passwd * userRec;
userRec = getpwnam(username);
shell = strdup(userRec.pw_shell);
This will properly consult any Open Directory domains on the search policy.
-Jason
On 3/23/07, David Nedrow <email@hidden> wrote:
I have a relatively simple need for Open Directory
(DirectoryService). I just need to get the current user's shell via
NetInfo. The Apple API references are less than optimal, and the
examples incomplete.
Does anyone out there have a working ds* method for getting a record
via NetInfo? I don't have any problem getting connected, etc., just
the actual query is baffling me.
Thanks in advance,
-David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden