### Debian.
## General stuff.
-##EXTRA_DIST += debian/rules
-##EXTRA_DIST += debian/control
-##EXTRA_DIST += debian/changelog
-##EXTRA_DIST += debian/copyright
+EXTRA_DIST += debian/control debian/copyright debian/changelog
+EXTRA_DIST += debian/rules debian/compat
+EXTRA_DIST += debian/yaid.install debian/yaid.init
+EXTRA_DIST += debian/yaid.policy
###----- That's all, folks --------------------------------------------------
--- /dev/null
+yaid/
+files
+*.debhelper
+*.log
+*.substvars
--- /dev/null
+yaid (1.0.0) experimental; urgency=low
+
+ * Initial version.
+
+ -- Mark Wooding <mdw@distorted.org.uk> Sun, 21 Oct 2012 15:23:43 +0100
+
--- /dev/null
+Source: yaid
+Section: net
+Priority: extra
+Maintainer: Mark Wooding <mdw@distorted.org.uk>
+Build-Depends: mlib-dev (>= 2.0.4), debhelper (>= 8),
+Standards-Version: 3.1.1
+
+Package: yaid
+Architecture: any
+Depends: ${shlibs:Depends}
+Provides: ident-server
+Conflicts: ident-server
+Description: Yet Another Ident Daemon: with NAT traversal and policy controls
+ The world doesn't need or want another ident server. But it did want one
+ with the right combination of features, so here it is.
+ .
+ YAID handles NAT usefully. On a NAT gateway, it will forward requests to
+ client hosts as necessary. On a client host, it will respond to forwarded
+ requests.
+ .
+ YAID has policy controls. A global file can decide how to reply to
+ particular kinds of query based on source and destination addresses and port
+ numbers, or on the user identified. It can delegate the decision to the
+ user in question, in a controlled way. It can anonymize the response in
+ various ways, keeping track of the real answer in its log.
--- /dev/null
+YAID is copyright (c) 2012 Straylight/Edgeware.
+
+YAID is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+YAID is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have a copy of the GNU General Public License in
+/usr/share/common-licenses/GPL; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+USA.
--- /dev/null
+#! /usr/bin/make -f
+
+%:; dh $@ -Bdebian/build --parallel
--- /dev/null
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: yaid ident-server
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Yet another ident daemon
+# Description: This file starts and stops YAID
+### END INIT INFO
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Yet another ident daemon"
+NAME=yaid
+DAEMON=/usr/sbin/$NAME
+PIDFILE=/var/run/$NAME.pid
+DAEMON_ARGS="-Dl -P$PIDFILE -Unobody -Gnogroup"
+SCRIPTNAME=/etc/init.d/$NAME
+
+[ -x "$DAEMON" ] || exit 0
+
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+. /lib/init/vars.sh
+. /lib/lsb/init-functions
+
+do_start()
+{
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+ || return 1
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+ $DAEMON_ARGS \
+ || return 2
+}
+
+do_stop()
+{
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ [ "$RETVAL" = 2 ] && return 2
+ start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+ [ "$?" = 2 ] && return 2
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ restart|force-reload)
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
--- /dev/null
+debian/yaid.policy etc
--- /dev/null
+### -*-conf-*-
+###
+### Example policy file for YAID.
+
+## LOCAL-ADDR LPORT REMOTE-ADDR RPORT USER ACTION
+
+## Astonishingly, ident can actually provide useful authentication on
+## loopback connections, so provide honest information.
+127.0.0.0/8 * 127.0.0.0/8 * * name
+:: * :: * * name
+
+## Reveal users' identity to queries from the local network.
+* * 172.16.0.0/12 * * name
+
+## Provide privacy for users by default, but allow them to override if they
+## want.
+* * * * * user name token
+* * * * * token