]> git.pld-linux.org Git - packages/dip.git/commitdiff
- additional patches for package dip
authorMarcin Krzyżanowski <marcin.krzyzanowski@hakore.com>
Thu, 8 Aug 2002 09:32:49 +0000 (09:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dip-3.3.7o-asm.patch -> 1.1
    dip-3.3.7o-db.patch -> 1.1
    dip-3.3.7o-jbj.patch -> 1.1
    dip-3.3.7o-lockfile.patch -> 1.1
    dip-3.3.7o-skey.patch -> 1.1
    dip-3.3.7o-timeout.patch -> 1.1
    dip-3.3.7o-types.patch -> 1.1

dip-3.3.7o-asm.patch [new file with mode: 0644]
dip-3.3.7o-db.patch [new file with mode: 0644]
dip-3.3.7o-jbj.patch [new file with mode: 0644]
dip-3.3.7o-lockfile.patch [new file with mode: 0644]
dip-3.3.7o-skey.patch [new file with mode: 0644]
dip-3.3.7o-timeout.patch [new file with mode: 0644]
dip-3.3.7o-types.patch [new file with mode: 0644]

diff --git a/dip-3.3.7o-asm.patch b/dip-3.3.7o-asm.patch
new file mode 100644 (file)
index 0000000..b27e9e4
--- /dev/null
@@ -0,0 +1,143 @@
+diff -uNr dip-3.3.7o/command.c dip-3.3.7o-64/command.c
+--- dip-3.3.7o/command.c       Tue May 30 15:42:24 2000
++++ dip-3.3.7o-64/command.c    Tue May 30 15:44:06 2000
+@@ -84,6 +84,10 @@
+ static char   var_securidfixed[9] = "";     /* fixed part of secureID */
+ #endif /* SECUREID */
++#ifndef HAS_STPCPY
++char *stpcpy(char *dest, const char *src);
++#endif
++
+ static void
+ sig_exit(void)
+ {
+@@ -682,7 +686,7 @@
+   nargv = malloc (argc*sizeof(char*));   /* allocate the array of pointers */
+   if (nargv == NULL)                     /* Ooops? */
+   {
+-    fprintf (stderr, "error: Couldn't allocate %ld bytes for"    /* Ooops! */
++    fprintf (stderr, "error: Couldn't allocate %d bytes for"    /* Ooops! */
+                            " onexit commands array: `%s'\n",
+              argc*sizeof(char*), strerror (errno) );
+     return -1;
+@@ -696,7 +700,7 @@
+     nargv[cnt] = malloc (strlen(argv[cnt]) + 1);   /* allocate */
+     if (nargv[cnt] == NULL)                        /* Oops? */
+     {
+-      fprintf (stderr, "error: Couldn't allocate %ld bytes for argument %d"
++      fprintf (stderr, "error: Couldn't allocate %d bytes for argument %d"
+                              " of the onexit command: `%s'\n",
+                strlen (argv[cnt]), cnt, strerror (errno) );
+       arg_clean (argc, nargv);       /* clean */
+@@ -2227,7 +2231,10 @@
+   }
+ }
+-#ifdef __alpha__
++/* This used to be Alpha-specific code, but the assembler code is not very
++ * portable to new binutils versions. */
++
++#ifdef unix
+ /*
+  * The following routines come from linux/arch/alpha/lib/checksum.c and
+@@ -2235,7 +2242,7 @@
+  */
+ static inline unsigned short
+-from64to16(unsigned long x)
++from64to16(u_int64_t x)
+ {
+       /* add up 32-bit words for 33 bits */
+       x = (x & 0xffffffff) + (x >> 32);
+@@ -2255,15 +2262,15 @@
+  * inner loop could be unrolled a bit further, and there are better
+  * ways to do the carry, but this is reasonable.
+  */
+-static inline unsigned long
++static inline u_int64_t
+ do_csum(unsigned char * buff, int len)
+ {
+       int odd, count;
+-      unsigned long result = 0;
++      u_int64_t result = 0;
+       if (len <= 0)
+               goto out;
+-      odd = 1 & (unsigned long) buff;
++      odd = 1 & (int) buff;
+       if (odd) {
+               result = *buff << 8;
+               len--;
+@@ -2271,7 +2278,7 @@
+       }
+       count = len >> 1;               /* nr of 16-bit words.. */
+       if (count) {
+-              if (2 & (unsigned long) buff) {
++              if (2 & (int) buff) {
+                       result += *(unsigned short *) buff;
+                       count--;
+                       len -= 2;
+@@ -2279,7 +2286,7 @@
+               }
+               count >>= 1;            /* nr of 32-bit words.. */
+               if (count) {
+-                      if (4 & (unsigned long) buff) {
++                      if (4 & (int) buff) {
+                               result += *(unsigned int *) buff;
+                               count--;
+                               len -= 4;
+@@ -2287,9 +2294,9 @@
+                       }
+                       count >>= 1;    /* nr of 64-bit words.. */
+                       if (count) {
+-                              unsigned long carry = 0;
++                              u_int64_t carry = 0;
+                               do {
+-                                      unsigned long w = *(unsigned long *) buff;
++                                      u_int64_t w = *(u_int64_t*) buff;
+                                       count--;
+                                       buff += 8;
+                                       result += carry;
+@@ -2332,21 +2339,21 @@
+  * computes the checksum of the TCP/UDP pseudo-header
+  * returns a 16-bit checksum, already complemented.
+  */
+-unsigned short int csum_tcpudp_magic(unsigned long saddr,
+-                                 unsigned long daddr,
++unsigned short int csum_tcpudp_magic(u_int64_t saddr,
++                                 u_int64_t daddr,
+                                  unsigned short len,
+                                  unsigned short proto,
+                                  unsigned int sum)
+ {
+       return ~from64to16(saddr + daddr + sum +
+-              ((unsigned long) ntohs(len) << 16) +
+-              ((unsigned long) proto << 8));
++              ((u_int64_t) ntohs(len) << 16) +
++              ((u_int64_t) proto << 8));
+ }
+ static unsigned short
+ udp_check(struct udphdr *uh, int len,
+-        unsigned long saddr, unsigned long daddr)
++        u_int64_t saddr, u_int64_t daddr)
+ {
+       return(csum_tcpudp_magic(saddr, daddr, len, IPPROTO_UDP, 0));
+ }
+diff -uNr dip-3.3.7o/login.c dip-3.3.7o-64/login.c
+--- dip-3.3.7o/login.c Tue Jun 13 14:46:31 1995
++++ dip-3.3.7o-64/login.c      Tue May 30 15:34:14 2000
+@@ -18,6 +18,10 @@
+  */
+ #include "dip.h"
++#ifdef MIN
++#undef MIN
++#endif
++
+ #define MIN(a, b) ((a < b)? a : b)
+ static int verify_inet_addr(char *p);
diff --git a/dip-3.3.7o-db.patch b/dip-3.3.7o-db.patch
new file mode 100644 (file)
index 0000000..8beef8f
--- /dev/null
@@ -0,0 +1,11 @@
+--- dip-3.3.7o/skey/Makefile   Tue May 30 15:46:17 2000
++++ dip-3.3.7o/skey/Makefile   Tue Dec 19 15:00:03 2000
+@@ -12,7 +12,7 @@
+ CC      = gcc
+ CFLAGS        = -pipe -O2 #-DUSE_ECHO
+ #SYSLIBS = -lshadow -ldbm
+-SYSLIBS = -ldb -lcrypt # For ELF - no shadow needed (included in libc).
++SYSLIBS = -lcrypt # For ELF - no shadow needed (included in libc).
+ LIB     =  libskey.a
+ PROGS   =  key keyinit keysh
diff --git a/dip-3.3.7o-jbj.patch b/dip-3.3.7o-jbj.patch
new file mode 100644 (file)
index 0000000..abd3a8f
--- /dev/null
@@ -0,0 +1,20 @@
+--- dip-3.3.7o/skey/skeysubr.c.jbj     Wed Jun  2 16:57:00 1999
++++ dip-3.3.7o/skey/skeysubr.c Wed Jun  2 16:57:44 1999
+@@ -94,7 +94,7 @@
+       unsigned int buflen;
+ #ifndef       Little_Endian
+       int i;
+-      register __u32 tmp;
++      register u_int32_t tmp;
+ #endif
+       
+       buflen = strlen(seed) + strlen(passwd);
+@@ -142,7 +142,7 @@
+ {
+       MDstruct md;
+ #ifndef       Little_Endian
+-      __u32 tmp;
++      u_int32_t tmp;
+ #endif
+       MDbegin(&md);
diff --git a/dip-3.3.7o-lockfile.patch b/dip-3.3.7o-lockfile.patch
new file mode 100644 (file)
index 0000000..9c3f703
--- /dev/null
@@ -0,0 +1,11 @@
+--- dip-3.3.7o/tty.c.lockfile  Mon Nov 22 13:25:27 1999
++++ dip-3.3.7o/tty.c   Mon Nov 22 13:25:27 1999
+@@ -883,7 +883,7 @@
+ int tty_getmode(void)
+ {
+-#if 0
++#if 1
+   return(tty_mode);
+ #else
+   return 1;
diff --git a/dip-3.3.7o-skey.patch b/dip-3.3.7o-skey.patch
new file mode 100644 (file)
index 0000000..a63baf3
--- /dev/null
@@ -0,0 +1,163 @@
+From mcintosh@mcintosh.research.telcordia.com  Wed Jun  2 16:18:29 1999
+Return-Path: <mcintosh@mcintosh.research.telcordia.com>
+Received: from mail.redhat.com (mail.redhat.com [199.183.24.239])
+       by developer.redhat.com (8.8.7/8.8.7) with ESMTP id QAA27467
+       for <bugzilla@developer.redhat.com>; Wed, 2 Jun 1999 16:18:29 -0400
+Received: from lacrosse.corp.redhat.com (root@lacrosse.corp.redhat.com [207.175.42.154])
+       by mail.redhat.com (8.8.7/8.8.7) with ESMTP id QAA15161
+       for <bugzilla@developer.redhat.com>; Wed, 2 Jun 1999 16:18:28 -0400
+Received: from mail.redhat.com (mail.redhat.com [199.183.24.239])
+       by lacrosse.corp.redhat.com (8.9.3/8.9.3) with ESMTP id QAA31733
+       for <bugzilla@lacrosse.redhat.com>; Wed, 2 Jun 1999 16:18:28 -0400
+Received: from mcintosh.research.telcordia.com (mcintosh.research.telcordia.com [192.4.12.155])
+       by mail.redhat.com (8.8.7/8.8.7) with ESMTP id QAA15157
+       for <bugzilla@redhat.com>; Wed, 2 Jun 1999 16:18:27 -0400
+Received: (from mcintosh@localhost)
+       by mcintosh.research.telcordia.com (8.8.7/8.8.7) id QAA01342
+       for bugzilla@redhat.com; Wed, 2 Jun 1999 16:17:56 -0400
+Date: Wed, 2 Jun 1999 16:17:56 -0400
+From: Allen Mcintosh <mcintosh@research.telcordia.com>
+Message-Id: <199906022017.QAA01342@mcintosh.research.telcordia.com>
+To: bugzilla@redhat.com
+Subject: BUG ID #3218
+
+This fixes a couple of problems in the DIP S/Key code, and tries to use
+the big/little endian code in /usr/include to keep the same problem from
+coming back on the next architecture.
+
+*** skey/md4.c 1999/05/27 17:34:00     1.1
+--- skey/md4.c 1999/05/27 17:56:17
+***************
+*** 36,47 ****
+   * MDupdate modifies has a side-effect on its input array (the order of bytes
+   * in each word are reversed).  If this is undesired a call to MDreverse(X) can
+   * reverse the bytes of X back into order after each call to MDupdate.
+   */
+  #define TRUE  1
+  #define FALSE 0
+  
+! #if (defined(__MSDOS__) || defined(MPU8086) || defined(MPU8080) \
+!  || defined(vax) || defined (MIPSEL) || defined(__alpha__))
+  #define LOWBYTEFIRST TRUE    /* Low order bytes are first in memory */
+  #else                        /* Almost all other machines are big-endian */
+  #define      LOWBYTEFIRST FALSE
+--- 36,52 ----
+   * MDupdate modifies has a side-effect on its input array (the order of bytes
+   * in each word are reversed).  If this is undesired a call to MDreverse(X) can
+   * reverse the bytes of X back into order after each call to MDupdate.
++  *
++  * If something included endian.h, use that
+   */
+  #define TRUE  1
+  #define FALSE 0
+  
+! #if (defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN) \
+!  || (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) \
+!  || (defined(__MSDOS__) || defined(MPU8086) || defined(MPU8080) \
+!  || defined(vax) || defined (MIPSEL) || defined(__alpha__)) \
+!  || defined(i386) || defined(__i386__)
+  #define LOWBYTEFIRST TRUE    /* Low order bytes are first in memory */
+  #else                        /* Almost all other machines are big-endian */
+  #define      LOWBYTEFIRST FALSE
+
+
+
+
+*** skey/skeysubr.c    1999/05/27 17:35:32     1.1
+--- skey/skeysubr.c    1999/05/27 18:01:30
+***************
+*** 68,76 ****
+  #include "md4.h"
+  #include "skey.h"
+  
+! #if (defined(__MSDOS__) || defined(MPU8086) || defined(MPU8080) \
+!     || defined(vax) || defined (MIPSEL))
+! #define      LITTLE_ENDIAN
+  #endif
+  
+  /* Crunch a key:
+--- 68,82 ----
+  #include "md4.h"
+  #include "skey.h"
+  
+! /*
+!  * If something included endian.h, use that
+!  */
+! 
+! #if (defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN) \
+!  || (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) \
+!  || defined(__MSDOS__) || defined(MPU8086) || defined(MPU8080) \
+!  || defined(vax) || defined (MIPSEL) || defined(i386) || defined(__i386__)
+! #define      Little_Endian
+  #endif
+  
+  /* Crunch a key:
+***************
+*** 86,92 ****
+       char *buf;
+       MDstruct md;
+       unsigned int buflen;
+! #ifndef      LITTLE_ENDIAN
+       int i;
+       register __u32 tmp;
+  #endif
+--- 92,98 ----
+       char *buf;
+       MDstruct md;
+       unsigned int buflen;
+! #ifndef      Little_Endian
+       int i;
+       register __u32 tmp;
+  #endif
+***************
+*** 108,114 ****
+       md.buffer[0] ^= md.buffer[2];
+       md.buffer[1] ^= md.buffer[3];
+  
+! #ifdef       LITTLE_ENDIAN
+       /* Only works on byte-addressed little-endian machines!! */
+       memcpy(result,(char *)md.buffer,8);
+  #else
+--- 114,120 ----
+       md.buffer[0] ^= md.buffer[2];
+       md.buffer[1] ^= md.buffer[3];
+  
+! #ifdef       Little_Endian
+       /* Only works on byte-addressed little-endian machines!! */
+       memcpy(result,(char *)md.buffer,8);
+  #else
+***************
+*** 135,141 ****
+  char *x;
+  {
+       MDstruct md;
+! #ifndef      LITTLE_ENDIAN
+       __u32 tmp;
+  #endif
+  
+--- 141,147 ----
+  char *x;
+  {
+       MDstruct md;
+! #ifndef      Little_Endian
+       __u32 tmp;
+  #endif
+  
+***************
+*** 146,152 ****
+       md.buffer[0] ^= md.buffer[2];
+       md.buffer[1] ^= md.buffer[3];
+  
+! #ifdef       LITTLE_ENDIAN
+       /* Only works on byte-addressed little-endian machines!! */
+       memcpy(x,(char *)md.buffer,8);
+  
+--- 152,158 ----
+       md.buffer[0] ^= md.buffer[2];
+       md.buffer[1] ^= md.buffer[3];
+  
+! #ifdef       Little_Endian
+       /* Only works on byte-addressed little-endian machines!! */
+       memcpy(x,(char *)md.buffer,8);
+  
+
diff --git a/dip-3.3.7o-timeout.patch b/dip-3.3.7o-timeout.patch
new file mode 100644 (file)
index 0000000..04bf13f
--- /dev/null
@@ -0,0 +1,10 @@
+--- dip-3.3.7o/main.c.timeout  Mon Nov 22 13:16:38 1999
++++ dip-3.3.7o/main.c  Mon Nov 22 13:16:38 1999
+@@ -396,6 +396,7 @@
+   (void) signal(SIGTERM, catch);
+   (void) signal(SIGHUP,  log_catch);
+   (void) signal(SIGQUIT, catch);  
++  (void) siginterrupt(SIGALRM, 1);
+   /* Verbose mode? -> print mydip values */
+   if (opt_v == 1) {
diff --git a/dip-3.3.7o-types.patch b/dip-3.3.7o-types.patch
new file mode 100644 (file)
index 0000000..ce9da0d
--- /dev/null
@@ -0,0 +1,10 @@
+--- dip-3.3.7o/tty.c   Tue May 30 15:56:06 2000
++++ dip-3.3.7o/tty.c   Tue May 30 15:55:49 2000
+@@ -30,6 +30,7 @@
+ #include <sys/stat.h>
+ #ifdef LINUX
+ #ifndef NO_SERIAL
++#   include <linux/types.h>
+ #   include <linux/serial.h> /* for Linux-1.1.13 */
+ #endif /* ~NO_SERIAL */
+ #endif
This page took 0.113776 seconds and 4 git commands to generate.