Most people/single-user systems need ident running for IRC, typically to
comply with the IRC server policy, or to remove the tilde sign from their
username. Running a full-blown ident daemon, both bundled with the OS, or
the IRC client, for this purpose seems overkill to me. A mate used Perl for
this and out spawned some C code from the idea:

$ cat /etc/inetd.conf | grep fakeident 
auth stream tcp nowait nobody /usr/local/bin/fakeident fakeident

$ cat /usr/local/bin/fakeident
#! /usr/local/bin/perl 
$in = <STDIN>; 
($p1, $p2) = split(/\,/, $in);
printf("%d , %d : USERID : UNIX : unix\n", $p1, $p2);



$ #A simple way to do this in C:
$ cat fakeident.c
#include <stdio.h>

main()
{
   int u1, u2;
   char buff[512];
   fgets(buff,511,stdin);
   sscanf(buff,"%d,%d",&u1,&u2);
   printf("%d , %d : USERID : UNIX : unix\n",u1,u2);
}
/*EOF*/


Since a lot of users just need to send a single auth/ident response to IRC
servers, and only need like an alternative/fake ident daemon, invoked using
inetd. This could be improved(?) by being a standalone program that binds to
port 113.
Most IRC clients come bundled with an ident daemon, but this is what I like,
and use at my perimeter router on a NAT LAN.
I'm no coder, and maybe this can be improved, and I'm open to constructive
criticism, but is something like this a candidate for a new port?



- S

Reply via email to