Re: Gah! Any real world Open Directory examples?
site_archiver@lists.apple.com Delivered-To: Darwin-dev@lists.apple.com Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=CIyb5Ytsfhm4Tg7P0nCuCQeeQMKBqFVyJpA6gDPx8oo+KRHifOxDU1cYEpExpr55P2ilbofBdj8gPYIE8arNiFN0eSbExW/BZBrIsYakyikeIvrvpPpxFlUWN1/bbhlnyGgTen3zX89xNViR0fUXZsTg/Pa6nD6LDsMKVS4CXbI= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=kvYCFOMJWtRnFIeJPbf431uu0mI728Fxy9kT5cWP+xwG/KZfZ2qX8TcwV0cnvEqXRZSly0lG5z2Xeaa3pWwMXuve5Rx+58rU6CI/+LqwZv/dkqN9fdbXN/vJ4l4gKMtLiSujIZVnEZ56yfTHeDHtsTwwgb+cfbWIG3Ci875le70= 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 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, _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... On 3/23/07, David Nedrow <dnedrow@mac.com> wrote: -David This email sent to site_archiver@lists.apple.com
participants (1)
-
Jason Townsend