*.o
stamp-h1
trivial.fingerd
+fingerd.plist
sbin_PROGRAMS=trivial.fingerd
trivial_fingerd_SOURCES=fingerd.c
man_MANS=trivial.fingerd.8
-EXTRA_DIST=autogen.sh
+EXTRA_DIST=autogen.sh fingerd.plist.in
+
+# launchd config for OS X systems
+# http://developer.apple.com/macosx/launchd.html
+all: fingerd.plist
+
+fingerd.plist: fingerd.plist.in Makefile
+ sed < fingerd.plist.in > fingerd.plist \
+ 's,_sbindir_,${sbindir},g'
+
+install-data-local:
+ @if [ -w /Library/LaunchDaemons ]; then \
+ echo ${INSTALL} -m 644 fingerd.plist /Library/LaunchDaemons/uk.org.greenend.fingerd.plist ;\
+ ${INSTALL} -m 644 fingerd.plist /Library/LaunchDaemons/uk.org.greenend.fingerd.plist ;\
+ fi
+
+uninstall-local:
+ @if [ -w /Library/LaunchDaemons ]; then \
+ echo launchctl unload /Library/LaunchDaemons/uk.org.greenend.fingerd.plist ;\
+ launchctl unload /Library/LaunchDaemons/uk.org.greenend.fingerd.plist || true ;\
+ echo rm -f /Library/LaunchDaemons/uk.org.greenend.fingerd.plist ;\
+ rm -f /Library/LaunchDaemons/uk.org.greenend.fingerd.plist ;\
+ fi
This is a trivial finger server that reveals only very limited amounts
of information.
-Installation:
+Installation (all platforms)
+----------------------------
+
./configure
make
sudo make install
-Then update your inetd.conf (or similar) to run on TCP port 79. For
-example:
+inetd configuration (Linux etc)
+-------------------------------
+
+Add the following line to your /etc/inetd.conf:
finger stream tcp nowait nobody.nogroup /usr/local/sbin/trivial.fingerd /usr/local/sbin/trivial.fingerd
+
+Then restart or reload inetd.
+
+launchd configuraiton (OS X)
+----------------------------
+
+'make install' will install a suitable plist into
+/Library/LaunchDaemons. To enable it you must use launchctl:
+
+$ sudo launchctl load /Library/LaunchDaemons/uk.org.greenend.fingerd.plist
+
+To disable it do the same but with 'unload'. 'make uninstall' will
+also perform this step.
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ <key>Disabled</key>
+ <false/>
+ <key>Label</key>
+ <string>uk.org.greenend.fingerd</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>_sbindir_/trivial.fingerd</string>
+ </array>
+ <key>inetdCompatibility</key>
+ <dict>
+ <key>Wait</key>
+ <false/>
+ </dict>
+ <key>UserName</key>
+ <string>nobody</string>
+ <key>GroupName</key>
+ <string>nogroup</string>
+ <key>InitGroups</key>
+ <true/>
+ <key>Sockets</key>
+ <dict>
+ <key>Listeners</key>
+ <dict>
+ <key>SockServiceName</key>
+ <string>finger</string>
+ </dict>
+ </dict>
+ </dict>
+</plist>