pkgsrc-Changes archive

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

CVS commit: pkgsrc/net/netcat



Module Name:    pkgsrc
Committed By:   tnn
Date:           Mon Aug  5 10:24:33 UTC 2024

Modified Files:
        pkgsrc/net/netcat: distinfo
        pkgsrc/net/netcat/patches: patch-aa patch-ab patch-ac patch-ad

Log Message:
netcat: fix assorted header and prototype problems


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/net/netcat/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/net/netcat/patches/patch-aa \
    pkgsrc/net/netcat/patches/patch-ac
cvs rdiff -u -r1.3 -r1.4 pkgsrc/net/netcat/patches/patch-ab
cvs rdiff -u -r1.5 -r1.6 pkgsrc/net/netcat/patches/patch-ad

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/netcat/distinfo
diff -u pkgsrc/net/netcat/distinfo:1.15 pkgsrc/net/netcat/distinfo:1.16
--- pkgsrc/net/netcat/distinfo:1.15     Tue Oct 26 11:06:07 2021
+++ pkgsrc/net/netcat/distinfo  Mon Aug  5 10:24:32 2024
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.15 2021/10/26 11:06:07 nia Exp $
+$NetBSD: distinfo,v 1.16 2024/08/05 10:24:32 tnn Exp $
 
 BLAKE2s (nc110.tgz) = 77c5f189d1b9107115826547998e43476fe8acb8d8b6a4aa4d4f3190630dfd10
 SHA512 (nc110.tgz) = c9a7f5045f76d9ffef4e83fcc3e82f69ac4eb05e061686db51e9367949bfe0b90226b290a059dc68dcf3bf2040b95b5c78545199674da57a7c73e2f9145cf812
 Size (nc110.tgz) = 75267 bytes
-SHA1 (patch-aa) = 44dc8cf9072a1c127925a4efed6bb7f1428360bc
-SHA1 (patch-ab) = 73990f9a87b04fffb22b94873e3225bd8ee496b5
-SHA1 (patch-ac) = 8b0c41953ab0237304a31fb999e27a51df8cb0a9
-SHA1 (patch-ad) = 0e6e3234a1abbec1151705a0c21bc1b7a87044f4
+SHA1 (patch-aa) = 5072f121a062e48b19aafc4a24823bedb7008605
+SHA1 (patch-ab) = 5e9d73f23d91979d65923f14caa3292e01f6d226
+SHA1 (patch-ac) = b505f6e78415fec9c124d0deba3f169d7ed59f40
+SHA1 (patch-ad) = 623d6eb284eb7dfa8c2af65b5e5a712a1b7597f2
 SHA1 (patch-ae) = 80c8fd9b6b98ff026e65a90e5360c12c16ce86db
 SHA1 (patch-af) = 379c35bd9bd4b2526eace0c8e95c9147f9b13dce

Index: pkgsrc/net/netcat/patches/patch-aa
diff -u pkgsrc/net/netcat/patches/patch-aa:1.2 pkgsrc/net/netcat/patches/patch-aa:1.3
--- pkgsrc/net/netcat/patches/patch-aa:1.2      Tue Oct  8 14:29:36 2002
+++ pkgsrc/net/netcat/patches/patch-aa  Mon Aug  5 10:24:32 2024
@@ -1,12 +1,23 @@
-$NetBSD: patch-aa,v 1.2 2002/10/08 14:29:36 abs Exp $
+$NetBSD: patch-aa,v 1.3 2024/08/05 10:24:32 tnn Exp $
 
---- data/data.c.orig   Tue Feb 27 13:43:48 1996
+--- data/data.c.orig   1996-02-27 13:43:48.000000000 +0000
 +++ data/data.c
-@@ -16,6 +16,7 @@
+@@ -16,6 +16,10 @@
     *Hobbit*, started 951004 or so and randomly screwed around with since */
  
  #include <stdio.h>
 +#include <string.h>
++#include <unistd.h>
++#include <stdlib.h>
++#include <time.h>
  
  #ifdef MSDOS                          /* for MSC only at the moment... */
  #include <fcntl.h>
+@@ -72,6 +76,7 @@ int randint()
+   return (x);
+ }
+ 
++int
+ main (argc, argv)
+   int argc;
+   char ** argv;
Index: pkgsrc/net/netcat/patches/patch-ac
diff -u pkgsrc/net/netcat/patches/patch-ac:1.2 pkgsrc/net/netcat/patches/patch-ac:1.3
--- pkgsrc/net/netcat/patches/patch-ac:1.2      Tue Oct  8 14:29:36 2002
+++ pkgsrc/net/netcat/patches/patch-ac  Mon Aug  5 10:24:32 2024
@@ -1,12 +1,30 @@
-$NetBSD: patch-ac,v 1.2 2002/10/08 14:29:36 abs Exp $
+$NetBSD: patch-ac,v 1.3 2024/08/05 10:24:32 tnn Exp $
 
---- data/xor.c.orig    Sun Feb 18 03:18:16 1996
+--- data/xor.c.orig    1996-02-18 03:18:16.000000000 +0000
 +++ data/xor.c
-@@ -14,6 +14,7 @@
+@@ -14,13 +14,17 @@
     *Hobbit*, 960208 */
  
  #include <stdio.h>
 +#include <string.h>
  #include <fcntl.h>
++#include <stdlib.h>
++#include <unistd.h>
  
  char buf[8192];
+ char bytes[256];
+ char * py;
+ 
+ /* do the xor, in place.  Uses global ptr "py" to maintain "bytes" state */
++int
+ xorb (buf, len)
+   char * buf;
+   int len;
+@@ -41,6 +45,7 @@ xorb (buf, len)
+ } /* xorb */
+ 
+ /* blah */
++int
+ main (argc, argv)
+   int argc;
+   char ** argv;

Index: pkgsrc/net/netcat/patches/patch-ab
diff -u pkgsrc/net/netcat/patches/patch-ab:1.3 pkgsrc/net/netcat/patches/patch-ab:1.4
--- pkgsrc/net/netcat/patches/patch-ab:1.3      Tue Oct  8 14:29:36 2002
+++ pkgsrc/net/netcat/patches/patch-ab  Mon Aug  5 10:24:32 2024
@@ -1,12 +1,21 @@
-$NetBSD: patch-ab,v 1.3 2002/10/08 14:29:36 abs Exp $
+$NetBSD: patch-ab,v 1.4 2024/08/05 10:24:32 tnn Exp $
 
---- data/rservice.c.orig       Wed Jan 31 18:45:08 1996
+--- data/rservice.c.orig       1996-01-31 18:45:08.000000000 +0000
 +++ data/rservice.c
-@@ -10,6 +10,7 @@
+@@ -10,12 +10,16 @@
     ... whatever.  _H*/
  
  #include <stdio.h>
 +#include <string.h>
++#include <stdlib.h>
++#include <unistd.h>
  
  /* change if you like; "id" is a good one for figuring out if you won too */
  static char cmd[] = "pwd";
+ 
+ static char buf [256];
+ 
++int
+ main(argc, argv)
+   int argc;
+   char * argv[];

Index: pkgsrc/net/netcat/patches/patch-ad
diff -u pkgsrc/net/netcat/patches/patch-ad:1.5 pkgsrc/net/netcat/patches/patch-ad:1.6
--- pkgsrc/net/netcat/patches/patch-ad:1.5      Tue Dec 29 04:04:30 2015
+++ pkgsrc/net/netcat/patches/patch-ad  Mon Aug  5 10:24:32 2024
@@ -1,7 +1,7 @@
-$NetBSD: patch-ad,v 1.5 2015/12/29 04:04:30 dholland Exp $
+$NetBSD: patch-ad,v 1.6 2024/08/05 10:24:32 tnn Exp $
 
---- netcat.c.orig      1996-03-21 01:38:04.000000000 +0100
-+++ netcat.c   2011-01-13 16:06:00.000000000 +0100
+--- netcat.c.orig      1996-03-21 00:38:04.000000000 +0000
++++ netcat.c
 @@ -44,12 +44,7 @@
  #include <sys/select.h>
  #endif
@@ -16,7 +16,16 @@ $NetBSD: patch-ad,v 1.5 2015/12/29 04:04
  
  #ifdef HAVE_RANDOM            /* aficionados of ?rand48() should realize */
  #define SRAND srandom         /* that this doesn't need *strong* random */
-@@ -151,6 +146,7 @@
+@@ -73,6 +68,8 @@
+ #include <errno.h>
+ #include <signal.h>
+ #include <fcntl.h>            /* O_WRONLY et al */
++#include <time.h>
++#include <unistd.h>
+ 
+ /* handy stuff: */
+ #define SA struct sockaddr    /* socket overgeneralization braindeath */
+@@ -151,6 +148,7 @@ unsigned char * stage = NULL;      /* hexdump
  
  /* global cmd flags: */
  USHORT o_alla = 0;
@@ -24,7 +33,7 @@ $NetBSD: patch-ad,v 1.5 2015/12/29 04:04
  unsigned int o_interval = 0;
  USHORT o_listen = 0;
  USHORT o_nflag = 0;
-@@ -160,6 +156,7 @@
+@@ -160,6 +158,7 @@ USHORT o_udpmode = 0;
  USHORT o_verbose = 0;
  unsigned int o_wait = 0;
  USHORT o_zero = 0;
@@ -32,7 +41,15 @@ $NetBSD: patch-ad,v 1.5 2015/12/29 04:04
  /* o_tn in optional section */
  
  /* Debug macro: squirt whatever message and sleep a bit so we can see it go
-@@ -225,6 +222,14 @@
+@@ -171,6 +170,7 @@ USHORT o_zero = 0;
+ #define Debug(x)      /* nil... */
+ #endif
+ 
++void helpme();
+ 
+ /* support routines -- the bulk of this thing.  Placed in such an order that
+    we don't have to forward-declare anything: */
+@@ -225,6 +225,14 @@ void catch ()
    bail (" punt!");
  }
  
@@ -47,7 +64,7 @@ $NetBSD: patch-ad,v 1.5 2015/12/29 04:04
  /* timeout and other signal handling cruft */
  void tmtravel ()
  {
-@@ -333,6 +338,7 @@
+@@ -333,6 +341,7 @@ HINF * gethostpoop (name, numeric)
    struct in_addr iaddr;
    register HINF * poop = NULL;
    register int x;
@@ -55,7 +72,7 @@ $NetBSD: patch-ad,v 1.5 2015/12/29 04:04
  
  /* I really want to strangle the twit who dreamed up all these sockaddr and
     hostent abstractions, and then forced them all to be incompatible with
-@@ -361,9 +367,9 @@
+@@ -361,9 +370,9 @@ HINF * gethostpoop (name, numeric)
      bail ("gethostpoop fuxored");
    strcpy (poop->name, unknown);               /* preload it */
  /* see wzv:workarounds.c for dg/ux return-a-struct inet_addr lossage */
@@ -67,7 +84,15 @@ $NetBSD: patch-ad,v 1.5 2015/12/29 04:04
      if (numeric)
        bail ("Can't parse %s as an IP address", name);
      hostent = gethostbyname (name);
-@@ -620,6 +626,13 @@
+@@ -568,6 +577,7 @@ char * pr00gie = NULL;                     /* global ptr t
+    that would be security-critical, which is why it's ifdefed out by default.
+    Use at your own hairy risk; if you leave shells lying around behind open
+    listening ports you deserve to lose!! */
++void
+ doexec (fd)
+   int fd;
+ {
+@@ -620,6 +630,13 @@ newskt:
    rr = setsockopt (nnetfd, SOL_SOCKET, SO_REUSEADDR, &x, sizeof (x));
    if (rr == -1)
      holler ("nnetfd reuseaddr failed");               /* ??? */
@@ -81,7 +106,15 @@ $NetBSD: patch-ad,v 1.5 2015/12/29 04:04
  #ifdef SO_REUSEPORT   /* doesnt exist everywhere... */
    rr = setsockopt (nnetfd, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x));
    if (rr == -1)
-@@ -1216,6 +1229,18 @@
+@@ -944,6 +961,7 @@ dol_err:
+    Use the time delay between writes if given, otherwise use the "tcp ping"
+    trick for getting the RTT.  [I got that idea from pluvius, and warped it.]
+    Return either the original fd, or clean up and return -1. */
++int
+ udptest (fd, where)
+   int fd;
+   IA * where;
+@@ -1216,6 +1234,18 @@ Debug (("got %d from the net, errno %d",
        if (rr <= 0) {                  /* at end, or fukt, or ... */
          FD_CLR (0, ding1);            /* disable and close stdin */
          close (0);
@@ -100,7 +133,15 @@ $NetBSD: patch-ad,v 1.5 2015/12/29 04:04
        } else {
          rzleft = rr;
          zp = bigbuf_in;
-@@ -1314,10 +1339,6 @@
+@@ -1292,6 +1322,7 @@ Debug (("wrote %d to net, errno %d", rr,
+ 
+ /* main :
+    now we pull it all together... */
++int
+ main (argc, argv)
+   int argc;
+   char ** argv;
+@@ -1314,10 +1345,6 @@ main (argc, argv)
    USHORT curport = 0;
    char * randports = NULL;
  
@@ -111,7 +152,7 @@ $NetBSD: patch-ad,v 1.5 2015/12/29 04:04
  /* I was in this barbershop quartet in Skokie IL ... */
  /* round up the usual suspects, i.e. malloc up all the stuff we need */
    lclend = (SAI *) Hmalloc (sizeof (SA));
-@@ -1354,7 +1375,8 @@
+@@ -1354,7 +1381,8 @@ main (argc, argv)
      argv[1] = cp;                     /* head of new arg block */
      fprintf (stderr, "Cmd line: ");
      fflush (stderr);          /* I dont care if it's unbuffered or not! */
@@ -121,7 +162,7 @@ $NetBSD: patch-ad,v 1.5 2015/12/29 04:04
      if (insaved <= 0)
        bail ("wrong");
      x = findline (cp, insaved);
-@@ -1389,12 +1411,14 @@
+@@ -1389,12 +1417,14 @@ main (argc, argv)
  
  /* If your shitbox doesn't have getopt, step into the nineties already. */
  /* optarg, optind = next-argv-component [i.e. flag arg]; optopt = last-char */
@@ -137,7 +178,7 @@ $NetBSD: patch-ad,v 1.5 2015/12/29 04:04
  #ifdef GAPING_SECURITY_HOLE
        case 'e':                               /* prog to exec */
        pr00gie = optarg;
-@@ -1443,6 +1467,8 @@
+@@ -1443,6 +1473,8 @@ main (argc, argv)
        break;
        case 'r':                               /* randomize various things */
        o_random++; break;
@@ -146,7 +187,15 @@ $NetBSD: patch-ad,v 1.5 2015/12/29 04:04
        case 's':                               /* local source address */
  /* do a full lookup [since everything else goes through the same mill],
     unless -n was previously specified.  In fact, careful placement of -n can
-@@ -1642,6 +1668,7 @@
+@@ -1627,6 +1659,7 @@ Debug (("netfd %d from port %d to port %
+ #ifdef HAVE_HELP              /* unless we wanna be *really* cryptic */
+ /* helpme :
+    the obvious */
++void
+ helpme()
+ {
+   o_verbose = 1;
+@@ -1642,6 +1675,7 @@ options:");
        -e prog                 program to exec after connect [dangerous!!]");
  #endif
    holler ("\
@@ -154,7 +203,7 @@ $NetBSD: patch-ad,v 1.5 2015/12/29 04:04
        -g gateway              source-routing hop point[s], up to 8\n\
        -G num                  source-routing pointer: 4, 8, 12, ...\n\
        -h                      this cruft\n\
-@@ -1651,6 +1678,7 @@
+@@ -1651,6 +1685,7 @@ options:");
        -o file                 hex dump of traffic\n\
        -p port                 local port number\n\
        -r                      randomize local and remote ports\n\



Home | Main Index | Thread Index | Old Index