Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin Adjust for dot_quad_addr() changes



details:   https://anonhg.NetBSD.org/src/rev/4e004dc74672
branches:  trunk
changeset: 472830:4e004dc74672
user:      christos <christos%NetBSD.org@localhost>
date:      Sun May 09 16:05:35 1999 +0000

description:
Adjust for dot_quad_addr() changes

diffstat:

 usr.sbin/tcpdchk/scaffold.c    |  6 +++---
 usr.sbin/tcpdchk/tcpdchk.c     |  9 +++++----
 usr.sbin/tcpdmatch/tcpdmatch.c |  6 +++---
 3 files changed, 11 insertions(+), 10 deletions(-)

diffs (91 lines):

diff -r a95e65d2ee85 -r 4e004dc74672 usr.sbin/tcpdchk/scaffold.c
--- a/usr.sbin/tcpdchk/scaffold.c       Sun May 09 16:03:10 1999 +0000
+++ b/usr.sbin/tcpdchk/scaffold.c       Sun May 09 16:05:35 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scaffold.c,v 1.3 1997/11/16 21:30:25 christos Exp $    */
+/*     $NetBSD: scaffold.c,v 1.4 1999/05/09 16:05:35 christos Exp $    */
 
  /*
   * Routines for testing only. Not really industrial strength.
@@ -11,7 +11,7 @@
 #if 0
 static char sccs_id[] = "@(#) scaffold.c 1.5 95/01/03 09:13:48";
 #else
-__RCSID("$NetBSD: scaffold.c,v 1.3 1997/11/16 21:30:25 christos Exp $");
+__RCSID("$NetBSD: scaffold.c,v 1.4 1999/05/09 16:05:35 christos Exp $");
 #endif
 #endif
 
@@ -95,7 +95,7 @@
     /*
      * Host address: translate it to internal form.
      */
-    if ((addr.s_addr = dot_quad_addr(host)) != INADDR_NONE) {
+    if (dot_quad_addr(host, &addr) == 0) {
        h.h_addr_list = addr_list;
        h.h_addr_list[0] = (char *) &addr;
        h.h_length = sizeof(addr);
diff -r a95e65d2ee85 -r 4e004dc74672 usr.sbin/tcpdchk/tcpdchk.c
--- a/usr.sbin/tcpdchk/tcpdchk.c        Sun May 09 16:03:10 1999 +0000
+++ b/usr.sbin/tcpdchk/tcpdchk.c        Sun May 09 16:05:35 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcpdchk.c,v 1.5 1999/01/18 18:01:26 christos Exp $     */
+/*     $NetBSD: tcpdchk.c,v 1.6 1999/05/09 16:05:35 christos Exp $     */
 
  /*
   * tcpdchk - examine all tcpd access control rules and inetd.conf entries
@@ -21,7 +21,7 @@
 #if 0
 static char sccsid[] = "@(#) tcpdchk.c 1.7 96/02/11 17:01:34";
 #else
-__RCSID("$NetBSD: tcpdchk.c,v 1.5 1999/01/18 18:01:26 christos Exp $");
+__RCSID("$NetBSD: tcpdchk.c,v 1.6 1999/05/09 16:05:35 christos Exp $");
 #endif
 #endif
 
@@ -421,6 +421,7 @@
 {
     char   *mask;
     int     addr_count = 1;
+    struct in_addr dummy;
 
     if (pat[0] == '@') {                       /* @netgroup */
 #ifdef NO_NETGRENT
@@ -440,8 +441,8 @@
 #endif
 #endif
     } else if ((mask = split_at(pat, '/')) != NULL) {  /* network/netmask */
-       if (dot_quad_addr(pat) == INADDR_NONE
-           || dot_quad_addr(mask) == INADDR_NONE)
+       if (dot_quad_addr(pat, &dummy) != 0
+           || dot_quad_addr(mask, &dummy) != 0)
            tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
     } else if (STR_EQ(pat, "FAIL")) {          /* obsolete */
        tcpd_warn("FAIL is no longer recognized");
diff -r a95e65d2ee85 -r 4e004dc74672 usr.sbin/tcpdmatch/tcpdmatch.c
--- a/usr.sbin/tcpdmatch/tcpdmatch.c    Sun May 09 16:03:10 1999 +0000
+++ b/usr.sbin/tcpdmatch/tcpdmatch.c    Sun May 09 16:05:35 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcpdmatch.c,v 1.4 1998/03/05 18:23:31 christos Exp $   */
+/*     $NetBSD: tcpdmatch.c,v 1.5 1999/05/09 16:06:33 christos Exp $   */
 
  /*
   * tcpdmatch - explain what tcpd would do in a specific case
@@ -20,7 +20,7 @@
 #if 0
 static char sccsid[] = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36";
 #else
-__RCSID("$NetBSD: tcpdmatch.c,v 1.4 1998/03/05 18:23:31 christos Exp $");
+__RCSID("$NetBSD: tcpdmatch.c,v 1.5 1999/05/09 16:06:33 christos Exp $");
 #endif
 #endif
 
@@ -210,7 +210,7 @@
      * If a client address is specified, we simulate the effect of client
      * hostname lookup failure.
      */
-    if (dot_quad_addr(client) != INADDR_NONE) {
+    if (dot_quad_addr(client, NULL) == 0) {
        request_set(&request, RQ_CLIENT_ADDR, client, 0);
        tcpdmatch(&request);
        exit(0);



Home | Main Index | Thread Index | Old Index