debian/0000755000000000000000000000000011614635342007173 5ustar debian/control0000644000000000000000000000101011606526677010601 0ustar Source: nullidentd Section: net Priority: optional Maintainer: Jeroen Schot Build-Depends: debhelper (>= 8) Standards-Version: 3.9.2 Homepage: http://www.tildeslash.org/nullidentd.html Package: nullidentd Provides: ident-server Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, netbase, update-inetd, openbsd-inetd | inet-superserver Description: small, fast identd daemon nullidentd is a small, fast and secure identd daemon. It returns a static string for every query. debian/manpages0000644000000000000000000000002411605255366010711 0ustar debian/nullidentd.8 debian/postrm0000644000000000000000000000164511605570314010445 0ustar #! /bin/sh # postrm script for nullidentd # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' overwrit>r> # for details, see /usr/doc/packaging-manual/ case "$1" in remove|purge) # If we leave an entry behind, it can conflict with a future # ident server. if [ -f /usr/sbin/update-inetd ]; then update-inetd --pattern '/usr/sbin/nullidentd' \ --remove '(## |)ident\t' fi ;; *) ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# debian/nullidentd.80000644000000000000000000000211111605570314011416 0ustar .\" .TH "nullidentd" "8" "January 24, 2001" "" "" .SH "NAME" nullidentd \- a bare minimum identd server .SH "SYNOPSIS" .B nullidentd .RI [uid] .br .SH "DESCRIPTION" This manual page documents briefly the .B nullidentd command. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. .PP .B Nullidentd is intended to be a bare minimum identd server, suitable for a firewall or IP Masq/NAT gateway. .SH "OPTIONS" .B nullidentd takes only one optional argument, the username to answer with. If this is omitted, .B nullidentd will reply with the username \*(lqfoobar\*(rq. If the username is RANDOM, a random string is generated. .SH "USAGE" .B nullidentd is typically invoked from inetd. The following is a typical inetd.conf example: .br .nh auth stream tcp nowait nobody /usr/sbin/nullidentd nullidentd .hy .SH "AUTHOR" .B nullidentd is written by Brian Young .PP This manual page was written by John H. Robinson, IV , for the Debian GNU/Linux system (but may be used by others). debian/changelog0000644000000000000000000000474611605571574011066 0ustar nullidentd (1.0-5) unstable; urgency=low * New maintainer. (Closes: #632878) * Depend on 'openbsd-inetd | inet-superserver'. (Closes: #497193, #599554) * Add Homepage field. * Update Standards-Version to 3.9.2. * Switch debian/rules to minimal dh. * Switch to source format 3.0 (quilt). -- Jeroen Schot Fri, 08 Jul 2011 13:59:31 +0200 nullidentd (1.0-4) unstable; urgency=low * Standards version 3.8.0.1 * debhelper version 7 * lintian clean * Properly remove inetd entries on remove/purge (Closes: #279237, #330491) * Disables auth entries prior to installation (Closes: #474145) * Removes ident entries prior to installation (Closes: #226953) -- John H. Robinson, IV Tue, 8 Jul 2008 10:42:14 -0700 nullidentd (1.0-3.1) unstable; urgency=high * Non-maintainer upload during BSP. * Fix unconditional use of update-inetd in postrm (Closes: #417035). * Depend on update-inetd as it is used in prerm and postinst. -- Luk Claes Thu, 17 May 2007 02:00:08 +0200 nullidentd (1.0-3) unstable; urgency=low * Compiles -Wall -pedantic clean * Random ID's are all eight characters long * Many thanks to Petter Reinholdtsen and Marc Brockschmidt for their NMU's -- John H. Robinson, IV Tue, 17 Aug 2004 21:40:18 -0700 nullidentd (1.0-2.2) unstable; urgency=low * Non-maintainer upload. * Add missing dependency on netbase. (Closes: #230641) * Correct email address of upstream author. (Closes: #230644) * Add support for returning random usernames. (Closes: #115204) -- Petter Reinholdtsen Thu, 5 Feb 2004 16:35:16 +0100 nullidentd (1.0-2.1) unstable; urgency=low * Non-maintainer upload. * debian/{postinst,prerm,postrm}: Fixed update-inetd calls to leave user config untouched. (Closes: #206253) * debian/changelog: Removed Emacs user settings at end of file. * debian/copyright: Removed boilerplate "(s)" to make lintian happy. * debian/control: Bumped Standards-Version to 3.6.1 (no changes) -- Marc Brockschmidt Sun, 21 Dec 2003 23:49:31 +0100 nullidentd (1.0-2) unstable; urgency=low * Added Provides: ident-server (closes: Bug#95270) -- John H. Robinson, IV Sat, 28 Apr 2001 00:21:58 -0700 nullidentd (1.0-1) unstable; urgency=low * Initial Release. (closes: Bug#83333) * Modified toplevel Makefile to support $(DESTDIR) -- John H. Robinson, IV Tue, 16 Jan 2001 20:21:00 -0800 debian/postinst0000644000000000000000000000274411605570314011005 0ustar #! /bin/sh # postinst script for nullidentd # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # # for details, see /usr/doc/packaging-manual/ # # quoting from the policy: # Any necessary prompting should almost always be confined to the # post-installation script, and should be protected with a conditional # so that unnecessary prompting doesn't happen if a package's # installation fails and the `postinst' is called with `abort-upgrade', # `abort-remove' or `abort-deconfigure'. case "$1" in configure) update-inetd --multi --disable auth # update-inetd will see previous ident entries, and use them instead. update-inetd --multi --remove '(## |)ident\t' update-inetd --group INFO --add 'ident\t\tstream\ttcp\tnowait\tnobody\t/usr/sbin/nullidentd\tnullidentd' ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 0 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/source/0000755000000000000000000000000011606526230010467 5ustar debian/source/format0000644000000000000000000000001411605570442011700 0ustar 3.0 (quilt) debian/source/lintian-overrides0000644000000000000000000000006011606526230014044 0ustar nullidentd source: debian-watch-file-is-missing debian/dirs0000644000000000000000000000001111605254026010043 0ustar usr/sbin debian/patches/0000755000000000000000000000000011606527151010621 5ustar debian/patches/01_random_usernames.diff0000644000000000000000000000457011606526765015335 0ustar From: Jason Thomas Subject: Add support for returning random usernames Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=115204 --- nullidentd-1.0.orig/nullidentd.c +++ nullidentd-1.0/nullidentd.c @@ -7,9 +7,11 @@ */ #include +#include #include #include #include +#include #include "version.h" @@ -18,6 +20,7 @@ #define MAX_RESPONSE 200 #define MAX_REQUEST 100 #define MAX_USERID 50 +#define MAX_RANDOMID 8 void usage() { @@ -46,7 +49,6 @@ int write_response( int fd, char *respon int read_request( int fd, char *request, int maxlen ) { - int retval; char c; int bytesread = 0; @@ -76,6 +78,22 @@ int read_request( int fd, char *request, return 1; } +char *random_userid( void ) +{ + static char buf[MAX_RANDOMID+1]; + size_t i; + static const char valid[] = + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + + for (i = 0 ; i < MAX_RANDOMID ; i++) + buf[i] = valid[rand() % (sizeof(valid) - 1)]; + + buf[i] = '\0'; + + return buf; +} + + void session_timeout( int foo ) { exit( 0 ); @@ -84,12 +102,12 @@ void session_timeout( int foo ) int main( int argc, const char *argv[] ) { const char * userid = "foobar"; - char c; int infd; int outfd; int response_len; char response[MAX_RESPONSE]; char request[MAX_REQUEST]; + int gen_random = 0; if( getgid() == 0 ) { fprintf( stderr, "Group id is root, exitting.\n" ); @@ -114,6 +132,10 @@ int main( int argc, const char *argv[] ) } } + if (strcmp(userid, "RANDOM") == 0) { + gen_random = 1; + } + infd = fileno( stdin ); outfd = fileno( stdout ); @@ -121,6 +143,8 @@ int main( int argc, const char *argv[] ) signal( SIGALRM, session_timeout ); alarm( SESSION_TIMEOUT ); + srand(getpid() ^ time(NULL)); + for( ;; ) { /* read the request */ if( !read_request( infd, request, MAX_REQUEST ) ) { @@ -128,6 +152,10 @@ int main( int argc, const char *argv[] ) goto done; } + if (gen_random) { + userid = random_userid(); + } + /* format the response */ response_len = snprintf( response, sizeof( response ), "%.20s : USERID : UNIX : %.20s\r\n", request, userid ); @@ -140,4 +168,3 @@ int main( int argc, const char *argv[] ) done: return 0; } - debian/patches/02_makefile.diff0000644000000000000000000000137211606527150013533 0ustar From: John H. Robinson, IV Subject: Modified toplevel Makefile to support $(DESTDIR) --- nullidentd-1.0.orig/Makefile +++ nullidentd-1.0/Makefile @@ -1,5 +1,9 @@ -INSTALL=/usr/local/sbin +# Edited for Debian GNU/Linux. +DESTDIR= + +INSTALL=$(DESTDIR)/usr/sbin + nullidentd: nullidentd.c version.h gcc -O2 -o nullidentd nullidentd.c @@ -21,9 +25,10 @@ clean: rm -f .version version.h nullidentd install: nullidentd - rm -f $(INSTALL)/nullidentd + #rm -f $(INSTALL)/nullidentd cp nullidentd $(INSTALL)/nullidentd chown root.root $(INSTALL)/nullidentd - chmod a-rw $(INSTALL)/nullidentd - chmod a+x $(INSTALL)/nullidentd + #chmod a-rw $(INSTALL)/nullidentd + #chmod a+x $(INSTALL)/nullidentd + chmod 0755 $(INSTALL)/nullidentd debian/patches/series0000644000000000000000000000005211606526765012045 0ustar 01_random_usernames.diff 02_makefile.diff debian/copyright0000644000000000000000000000077211605254026011130 0ustar This package was debianized by John H. Robinson IV on Tue, 16 Jan 2001 20:21:00 -0800. It was downloaded from http://www.tildeslash.org/nullidentd.html Upstream Author: Brian Young Copyright: Copyright 1999 Brian Young You are free to distribute this software under the terms of the GNU General Public License. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL file. debian/rules0000755000000000000000000000003611605254675010260 0ustar #!/usr/bin/make -f %: dh $@ debian/docs0000644000000000000000000000000711605254026010037 0ustar README debian/compat0000644000000000000000000000000211605254765010377 0ustar 8