From: David Schweikert Date: Sun, 4 May 2014 19:16:11 +0000 (+0200) Subject: remove support for NIS groups, do not retry twice DNS lookup on DNS lookup problem X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b5d9ef7952f4e03bd78ccc67d364b035e6a7989;p=fping.git remove support for NIS groups, do not retry twice DNS lookup on DNS lookup problem --- diff --git a/ChangeLog b/ChangeLog index da9a6fd..dd70efd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ UNRELEASED * More tests added * Fix confusing error message with -g and IPv6 addresses (#58, reported by Axel Beckert) * Allow option '-f' also for non-root (since setuid privileges are dropped) + * Remove support for NIS groups + * Do not retry twice DNS lookup on DNS lookup problem 2014-03-08 David Schweikert * Version 3.9 diff --git a/src/fping.c b/src/fping.c index cf8d5db..43cac42 100644 --- a/src/fping.c +++ b/src/fping.c @@ -1986,45 +1986,10 @@ void add_name( char *name ) host_ent = gethostbyname( name ); if( host_ent == NULL ) { - if( h_errno == TRY_AGAIN ) - { - u_sleep( DNS_TIMEOUT ); - host_ent = gethostbyname( name ); - - }/* IF */ - - if( host_ent == NULL ) - { -#ifdef NIS_GROUPS - - /* maybe it's the name of a NIS netgroup */ - char *machine, *user_ignored, *domain_ignored; - setnetgrent( name ); - if( getnetgrent( &machine, &user_ignored, &domain_ignored ) == 0 ) - { - endnetgrent(); - print_warning("%s address not found\n", name ); - - num_noaddress++; - return; - - }/* IF */ - else - add_name(machine); - - while( getnetgrent( &machine, &user_ignored, &domain_ignored ) ) - add_name(machine); - - endnetgrent(); - return; -#else print_warning("%s address not found\n", name ); - num_noaddress++; return ; -#endif /* NIS_GROUPS */ - }/* IF */ - }/* IF */ + } if(host_ent->h_addrtype != AF_INET) { print_warning("%s: IPv6 address returned by gethostbyname (options inet6 in resolv.conf?)\n", name ); diff --git a/src/options.h b/src/options.h index 3c99d80..bbc93d1 100644 --- a/src/options.h +++ b/src/options.h @@ -49,6 +49,3 @@ #ifndef DNS_TIMEOUT #define DNS_TIMEOUT 1000 /* time in micro_sec for dns retry */ #endif - -/* NIS_GROUPS allows input name to be an NIS netgroup name */ -/* #define NIS_GROUPS=1 */