PDA

View Full Version : launchd & xinetd in Snow Leopard




williamnova
Mar 10, 2011, 02:13 PM
Hi, I'm doing some research into the 10.6 OS I've come across two pieces of seemingly conflicting documentation.

In the Network Services Admin 10.6 PDF (http://images.apple.com/server/macosx/docs/Network_Services_Admin_v10.6.pdf) on pages 23-24 I'm reading "Mac OS X Server uses the xinetd process to manage many UNIX network services, such as FTP, finger, and so on. xinetd listens for requests on specific TCP/IP sockets and is a secure replacement for inetd. However, because xinetd does not handle RPC services well, inetd and xinetd are included with Mac OS X."

But Apple TN2083 (http://developer.apple.com/library/mac/#technotes/tn2005/tn2083.html#//apple_ref/doc/uid/DTS10003794) says "Starting with Mac OS X 10.4, inetd and xinetd daemons are deprecated in favor of launchd daemons; a launchd daemon can specify a list of TCP and UDP ports to listen on as part of its property list file. Starting with Mac OS X 10.5, inetd and xinetd daemons are no longer supported. However, it's easy to run an existing inetd or xinetd daemon by creating and installing a simple launchd property list file (resulting in an inetd-compatible launchd daemon). For an example of this, check out /System/Library/LaunchDaemons/finger.plist."

Can anybody shed some light on this? I have a feeling the TN is correct, but it would make me sad to find out that Apple's own server documentation is out of date. I'd attempt to poke around in the system myself, but sadly I can't afford a copy of 10.6 server. Lion can't come fast enough!

Thanks in advance for any info anybody can provide.



calderone
Mar 10, 2011, 10:34 PM
You are reading into this a bit too much.

What Apple is referring to in the TN is that xinetd/inetd were deprecated as a means for users/admin and 3rd parties to launch daemons. Instead you should use launched.

That doesn't mean that Apple cannot use them as a means for launching and maintaining their own services. And indeed they are. The implementation noted in the Network Services Admin PDF is starkly different from how launchd is used.

williamnova
Mar 11, 2011, 06:20 AM
Thanks. I was was confused by the number of postings on the internet I saw which kept referring to folks saying they're using launchd now since "there is no xinetd in SL anymore" and so on. I assumed that meant it had been taken out entirely and replaced with launchd.

I'm still not entirely sure the PDF isn't wrong, though. It mentions FTP and Finger specifically as two services that use xinetd, which means they should have entries in /etc/xinetd.conf and/or /etc/xinetd.d/<service>, right? Only my 10.6 workstation has nothing like that. I do, however, have .plist files for both of those in System/Library/LaunchDaemons/ - unless the server is using xinetd while my desktop is using launchd, but that doesn't seem right. :confused: