Skip to content
Snippets Groups Projects
Commit 659eefd6 authored by rswindell's avatar rswindell
Browse files

Performs an ident check on connected user.

parent f9dd93c6
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,7 @@
#endif
#include "sbbs.h"
#include "ident.h"
#include "telnet.h"
#include "bbs_thrd.h"
......@@ -2902,7 +2903,8 @@ static void cleanup(int code)
void DLLCALL bbs_thread(void* arg)
{
char * host_name;
char str[MAX_PATH];
char * identity;
char str[MAX_PATH+1];
char logstr[256];
SOCKADDR_IN server_addr={0};
SOCKADDR_IN client_addr;
......@@ -3432,6 +3434,7 @@ void DLLCALL bbs_thread(void* arg)
sbbs->bprintf("Resolving host name...");
h=gethostbyaddr((char *)&client_addr.sin_addr
,sizeof(client_addr.sin_addr),AF_INET);
sbbs->putcom(crlf);
}
if(h!=NULL && h->h_name!=NULL)
host_name=h->h_name;
......@@ -3448,6 +3451,15 @@ void DLLCALL bbs_thread(void* arg)
continue;
}
sbbs->bprintf("Resolving identity...");
identify(&client_addr, 23, str, sizeof(str)-1);
identity=strrchr(str,':');
if(identity==NULL) /* error */
identity=str;
else
identity++; /* point to user name */
lprintf("%04d Identity: %s",client_socket, identity);
/* Initialize client display */
client.size=sizeof(client);
client.time=time(NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment