exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

nama.patch2

nama.patch2
Posted Aug 17, 1999

nama.patch2

tags | tool, firewall
systems | unix
SHA-256 | abfc18fab6bcab3f68026d789b87dd425e4c40fec134bbaa67176cf9709f447b

nama.patch2

Change Mirror Download
*** nama.c  1997/03/31 16:57:54  1.10
--- nama.c 1997/04/02 16:09:53
***************
*** 10,16 ****
* Author: Marcus J. Ranum, Trusted Information Systems, Inc.
* Added "?" wildcard matching from William Gianopoulos, gianowa@eo.ray.com
*/
! static char RcsId[] = "$Header: /usr/home/rick/fwtk2.0/fwtk/lib/RCS/nama.c,v 1.10 1997/03/31 16:57:54 rick Exp $";

#include <stdio.h>
#include <sys/types.h>
--- 10,16 ----
* Author: Marcus J. Ranum, Trusted Information Systems, Inc.
* Added "?" wildcard matching from William Gianopoulos, gianowa@eo.ray.com
*/
! static char RcsId[] = "$Header: /usr/home/rick/fwtk2.0/fwtk/lib/RCS/nama.c,v 1.11 1997/04/02 16:09:46 rick Exp $";

#include <stdio.h>
#include <sys/types.h>
***************
*** 344,349 ****
--- 344,350 ----
if(*p != '\0') {
long f;
char *p = nam;
+ char *rev;

eq = 0;
while(*p != '\0' && (*p == '.' || isdigit(*p)))
***************
*** 378,389 ****
if(hp == (struct hostent *)0)
return(namatch(pat,"unknown"));

while((hp_addr = (struct in_addr *)*hp->h_addr_list++) != (struct in_addr *)0) {
- if(hp->h_length > sizeof(f)) {
- syslog(LLEV,"securityalert: invalid host address length (%d) hostname %.512s", hp->h_length, nam);
- return(0);
- }

if(bcmp(hp_addr,&f,hp->h_length) == 0) {
eq = 1;
break;
--- 379,392 ----
if(hp == (struct hostent *)0)
return(namatch(pat,"unknown"));

+ if(hp->h_length > sizeof(f)) {
+ syslog(LLEV,"securityalert: invalid host address length (%d) hostname %.512s", hp->h_length, nam);
+ return(0);
+ }
while((hp_addr = (struct in_addr *)*hp->h_addr_list++) != (struct in_addr *)0) {

+ if (hp_addr && !rev)
+ rev = inet_ntoa(*hp_addr);
if(bcmp(hp_addr,&f,hp->h_length) == 0) {
eq = 1;
break;
***************
*** 392,398 ****

if(!eq) {
syslog(LLEV,"securityalert: possible spoof - DNS lookup for address %.20s gives name %.512s but the reverse lookup is %.20s",
! name,nam,inet_ntoa(hp_addr));
return(namatch(pat,"unknown"));
}

--- 395,401 ----

if(!eq) {
syslog(LLEV,"securityalert: possible spoof - DNS lookup for address %.20s gives name %.512s but the reverse lookup is %.20s",
! name,nam,rev);
return(namatch(pat,"unknown"));
}

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close