Hi Guys (sorry, my english is poor):
I'm doing a C program to restrict who can login to our AIX server
using telnet.
The access method use the username-tty (or remote IP address) to
deny or allow the login. Aix support a second auth method so we
don't need to put it in /etc/profile.
We need to restrict access not just for remote IP address (like
tcp_wrapper), but for username too (username-line pair).
/etc/utmp is limited to 16 characters for the remote hostname.
I know any program inherit the socket from inetd, but in a telnet
session, file descriptor 0 is not a socket (so getpeername don't
work) but the socket stlii exists. How can i get a reference to it ???
HOW CAN I GET THE REMOTE ADDRESS ???
gracias ..
-------------------------------------------------
Unidad de Computacion y Analisis
Facultad de Ciencias Economicas y Administrativas
Universidad de Chile