clean up, rcs ids, etc.

This commit is contained in:
cgd 1994-02-04 23:17:50 +00:00
parent c5485aeac0
commit 9caa83cfc6
10 changed files with 38 additions and 70 deletions

View File

@ -1,4 +1,6 @@
/*
** $Id: config.c,v 1.2 1994/02/04 23:17:50 cgd Exp $
**
** config.c This file handles the config file
**
** This program is in the public domain and may be used freely by anyone

View File

@ -1,4 +1,6 @@
/*
** $Id: error.h,v 1.2 1994/02/04 23:17:53 cgd Exp $
**
** error.h Error handling macros
**
** This program is in the public domain and may be used freely by anyone

View File

@ -2,11 +2,13 @@
.\" Copyright (c) 1992 Peter Eriksson, Lysator, Linkoping University.
.\" This software has been released into the public domain.
.\"
.\" $Id: identd.8,v 1.2 1994/02/04 23:17:55 cgd Exp $
.\"
.TH IDENTD 8 "27 May 1992"
.SH NAME
identd, in.identd \- TCP/IP IDENT protocol server
identd \- TCP/IP IDENT protocol server
.SH SYNOPSIS
.B /usr/sbin/in.identd
.B identd
.RB [ \-i | \-w | \-b ]
.RB [ \-t<seconds> ]
.RB [ \-u<uid> ]
@ -215,51 +217,13 @@ defaults to the normally running kernel file.
.PP
.B kmemfile
defaults to the memory space of the normally running kernel.
.SH INSTALLATION
.B identd
is invoked either by the internet server (see
.BR inetd (8C)
) for requests to connect to the
.SM IDENT
port as indicated by the
.B /etc/services
file (see
.BR services (5)
) when using the
.B -w
or
.B -i
modes of operation or started manually by using the
.B -b
mode of operation.
.SH EXAMPLES
Assuming the server is located in
.B /usr/etc/in.identd
one can put either:
.PP
ident stream tcp wait sys /usr/etc/in.identd in.identd -w -t120
.PP
or:
.PP
ident stream tcp nowait sys /usr/etc/in.identd in.identd -i
.PP
into the
.B /etc/inetd.conf
file. User "sys" should have enough rights to READ the kernel
but NOT to write to it.
.PP
To start it using the
.B -b
mode of operation one can put a line like this into the
.B /etc/rc.local
file:
.PP
/usr/etc/in.identd -b -u2 -g2
.PP
This will make it run in the background as user 2, group 2 (user "sys",
group "kmem" on SunOS 4.1.1).
.SH SEE ALSO
.BR authuser (3)
.BR inetd.conf (5)
.SH BUGS
The handling of fatal errors could be better.
.PP
If the
.B -N
flag is specified and a user's ".noident" file is not accessible,
then ident information regarding that user will be returned
if requested.

View File

@ -1,4 +1,6 @@
/*
** $Id: identd.c,v 1.2 1994/02/04 23:17:56 cgd Exp $
**
** identd.c A TCP/IP link identification protocol server
**
** This program is in the public domain and may be used freely by anyone
@ -9,7 +11,7 @@
** Please send bug fixes/bug reports to: Peter Eriksson <pen@lysator.liu.se>
*/
#if defined(IRIX) || defined(SVR4) || defined(NeXT)
#if defined(IRIX) || defined(SVR4) || defined(NeXT) || defined(__NetBSD__)
# define SIGRETURN_TYPE void
# define SIGRETURN_TYPE_IS_VOID
#else
@ -149,7 +151,6 @@ char *gethost(addr)
return inet_ntoa(*addr);
}
#ifdef USE_SIGALARM
/*
** Exit cleanly after our time's up.
*/
@ -161,8 +162,6 @@ alarm_handler()
exit(0);
}
#endif
#if !defined(hpux) && !defined(__hpux) && !defined(SVR4) || defined(_CRAY)
/*
@ -212,9 +211,7 @@ int main(argc,argv)
int i, len;
struct sockaddr_in sin;
struct in_addr laddr, faddr;
#ifndef USE_SIGALARM
struct timeval tv;
#endif
int background_flag = 0;
int timeout = 0;
@ -488,7 +485,6 @@ int main(argc,argv)
*/
do
{
#ifdef USE_SIGALARM
/*
** Terminate if we've been idle for 'timeout' seconds
*/
@ -497,7 +493,6 @@ int main(argc,argv)
signal(SIGALRM, alarm_handler);
alarm(timeout);
}
#endif
/*
** Wait for a connection request to occur.
@ -508,7 +503,6 @@ int main(argc,argv)
FD_ZERO(&read_set);
FD_SET(0, &read_set);
#ifndef USE_SIGALARM
if (timeout)
{
tv.tv_sec = timeout;
@ -516,7 +510,6 @@ int main(argc,argv)
nfds = select(FD_SETSIZE, &read_set, NULL, NULL, &tv);
}
else
#endif
nfds = select(FD_SETSIZE, &read_set, NULL, NULL, NULL);
} while (nfds < 0 && errno == EINTR);
@ -533,12 +526,10 @@ int main(argc,argv)
if (nfds == 0)
exit(0);
#ifdef USE_SIGALARM
/*
** Disable the alarm timeout
*/
alarm(0);
#endif
/*
** Accept the new client

View File

@ -1,4 +1,6 @@
/*
** $Id: identd.h,v 1.2 1994/02/04 23:17:58 cgd Exp $
**
** identd.h Common variables for the Pidentd daemon
**
** This program is in the public domain and may be used freely by anyone

View File

@ -1,5 +1,7 @@
/*
** kernel/386bsd.c Low level kernel access functions for 386BSD
** $Id: netbsd.c,v 1.2 1994/02/04 23:18:00 cgd Exp $
**
** netbsd.c Low level kernel access functions for NetBSD
**
** This program is in the public domain and may be used freely by anyone
** who wants to.
@ -113,7 +115,7 @@ static int getbuf(addr, buf, len, what)
int len;
char *what;
{
if (kvm_read(addr, buf, len) < 0)
if (kvm_read((caddr_t) addr, buf, len) < 0)
{
if (syslog_flag)
syslog(LOG_ERR, "getbuf: kvm_read(%08x, %d) - %s : %m",

View File

@ -1,4 +1,6 @@
/*
** $Id: parse.c,v 1.2 1994/02/04 23:18:01 cgd Exp $
**
** parse.c This file contains the protocol parser
**
** This program is in the public domain and may be used freely by anyone
@ -21,11 +23,8 @@
# include <arpa/inet.h>
#endif
#ifdef HAVE_KVM
# include <kvm.h>
#else
# include "kvm.h"
#endif
#include <nlist.h>
#include <kvm.h>
#include <sys/types.h>
#include <sys/stat.h>
@ -83,7 +82,7 @@ static int valid_fhost(faddr, password)
{
if (strcmp(inet_ntoa(*faddr), indirect_host))
{
syslog(LOG_NOTICE, "valid_fhost: Access Denied for: %s",
syslog(LOG_NOTICE, "valid_fhost: access denied for: %s",
gethost(faddr));
return 0;
}
@ -92,7 +91,7 @@ static int valid_fhost(faddr, password)
{
if (strcmp(gethost(faddr), indirect_host))
{
syslog(LOG_NOTICE, "valid_fhost: Access Denied for: %s",
syslog(LOG_NOTICE, "valid_fhost: access denied for: %s",
gethost(faddr));
return 0;
}
@ -104,7 +103,7 @@ static int valid_fhost(faddr, password)
if (strcmp(password, indirect_password))
{
syslog(LOG_NOTICE, "valid_fhost: Invalid password from: %s",
syslog(LOG_NOTICE, "valid_fhost: invalid password from: %s",
gethost(faddr));
return 0;
}
@ -369,7 +368,7 @@ int parse(fp, laddr, faddr)
if (noident_flag && check_noident(pwp->pw_dir))
{
if (syslog_flag)
syslog(LOG_NOTICE, "User %s requested HIDDEN-USER for host %s: %d, %d",
syslog(LOG_NOTICE, "user %s requested HIDDEN-USER for host %s: %d, %d",
pwp->pw_name,
gethost(faddr),
lport, fport);

View File

@ -1,4 +1,6 @@
/*
** $Id: paths.h,v 1.2 1994/02/04 23:18:03 cgd Exp $
**
** paths.h Common path definitions for the in.identd daemon
**
** Last update: 11 Dec 1992
@ -6,6 +8,8 @@
** Please send bug fixes/bug reports to: Peter Eriksson <pen@lysator.liu.se>
*/
#include <paths.h>
#ifdef SEQUENT
# define _PATH_UNIX "/dynix"
#endif

View File

@ -1,4 +1,6 @@
/*
** $Id: proxy.c,v 1.2 1994/02/04 23:18:04 cgd Exp $
**
** proxy.c This file implements the proxy() call.
**
** This program is in the public domain and may be used freely by anyone

View File

@ -1 +1 @@
char *version = "2.1.2";
char *version = "2.1.2 (NetBSD version $Revision: 1.2 $)";