[Nagiosplug-checkins] CVS: nagiosplug/plugins check_dns.c,1.6,1.7
Karl DeBisschop
kdebisschop at users.sourceforge.net
Tue Feb 4 21:59:06 CET 2003
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv6463/plugins
Modified Files:
check_dns.c
Log Message:
allow check to proceed using servers from resolv.conf
Index: check_dns.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dns.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** check_dns.c 13 Jan 2003 12:15:15 -0000 1.6
--- check_dns.c 5 Feb 2003 05:58:35 -0000 1.7
***************
*** 353,372 ****
c = optind;
! if (query_address[0] == 0) {
! if (is_host (argv[c]) == FALSE) {
printf ("Invalid name/address: %s\n\n", argv[c]);
return ERROR;
}
! if (strlen (argv[c]) >= ADDRESS_LENGTH)
terminate (STATE_UNKNOWN, "Input buffer overflow\n");
strcpy (query_address, argv[c++]);
}
! if (dns_server[0] == 0) {
! if (is_host (argv[c]) == FALSE) {
printf ("Invalid name/address: %s\n\n", argv[c]);
return ERROR;
}
! if (strlen (argv[c]) >= ADDRESS_LENGTH)
terminate (STATE_UNKNOWN, "Input buffer overflow\n");
strcpy (dns_server, argv[c++]);
--- 353,372 ----
c = optind;
! if (strlen(query_address)==0 && c<argc) {
! if (is_host(argv[c])==FALSE) {
printf ("Invalid name/address: %s\n\n", argv[c]);
return ERROR;
}
! if (strlen(argv[c])>=ADDRESS_LENGTH)
terminate (STATE_UNKNOWN, "Input buffer overflow\n");
strcpy (query_address, argv[c++]);
}
! if (strlen(dns_server)==0 && c<argc) {
! if (is_host(argv[c]) == FALSE) {
printf ("Invalid name/address: %s\n\n", argv[c]);
return ERROR;
}
! if (strlen(argv[c]) >= ADDRESS_LENGTH)
terminate (STATE_UNKNOWN, "Input buffer overflow\n");
strcpy (dns_server, argv[c++]);
More information about the Commits
mailing list