honeyd/honeyd.patch

Tue, 28 Aug 2012 18:35:30 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:35:30 +0200
changeset 574
1074e5934dd9
child 575
6e491d7671a4
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

     1 Index: command.c
     2 --- command.c.orig	2006-08-19 09:10:40 +0200
     3 +++ command.c	2006-08-24 12:14:21 +0200
     4 @@ -72,6 +72,9 @@
     5  #include "pyextend.h"
     6  #include "honeyd_overload.h"
     7  #include "util.h"
     8 +#ifndef HAVE_SETENV
     9 +#include "setenv.h"
    10 +#endif
    12  ssize_t atomicio(ssize_t (*)(), int, void *, size_t);
    14 Index: compat/getopt.h
    15 --- compat/getopt.h.orig	2006-08-19 09:10:40 +0200
    16 +++ compat/getopt.h	2006-08-24 12:14:21 +0200
    17 @@ -40,7 +40,11 @@
    18  #ifndef _GETOPT_H_
    19  #define _GETOPT_H_
    21 +#ifdef HAVE_SYS_CDEFS_H
    22  #include <sys/cdefs.h>
    23 +#else
    24 +#include "cdefs.h"
    25 +#endif
    27  /*
    28   * GNU-like getopt_long() and 4.4BSD getsubopt()/optreset extensions
    29 Index: compat/sha1.h
    30 --- compat/sha1.h.orig	2006-08-19 09:10:40 +0200
    31 +++ compat/sha1.h	2006-08-24 12:14:21 +0200
    32 @@ -15,7 +15,11 @@
    33      unsigned char buffer[64];
    34  } SHA1_CTX;
    36 +#ifdef HAVE_SYS_CDEFS_H
    37  #include <sys/cdefs.h>
    38 +#else
    39 +#include "cdefs.h"
    40 +#endif
    42  __BEGIN_DECLS
    43  void SHA1Transform(u_int32_t [5], const unsigned char [64])
    44 Index: config.h.in
    45 --- config.h.in.orig	2006-01-17 18:11:44 +0100
    46 +++ config.h.in	2006-08-24 12:14:21 +0200
    47 @@ -222,6 +222,9 @@
    48  /* Define to 1 if you have the `strtoul' function. */
    49  #undef HAVE_STRTOUL
    51 +/* Define to 1 if you have the `setenv' function. */
    52 +#undef HAVE_SETENV
    53 +
    54  /* Define if your system defines struct sockaddr_storage */
    55  #undef HAVE_STRUCT_SOCKADDR_STORAGE
    57 @@ -255,6 +258,9 @@
    58  /* Define to 1 if you have the <sys/types.h> header file. */
    59  #undef HAVE_SYS_TYPES_H
    61 +/* Define to 1 if you have the <sys/cdefs.h> header file. */
    62 +#undef HAVE_SYS_CDEFS_H
    63 +
    64  /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
    65  #undef HAVE_SYS_WAIT_H
    67 Index: configure
    68 --- configure.orig	2006-08-19 09:11:11 +0200
    69 +++ configure	2006-08-24 12:14:21 +0200
    70 @@ -22317,7 +22317,7 @@
    74 -for ac_header in stdarg.h errno.h fcntl.h paths.h stdlib.h string.h time.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/ioccom.h sys/file.h syslog.h unistd.h assert.h
    75 +for ac_header in stdarg.h errno.h fcntl.h paths.h stdlib.h string.h time.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/ioccom.h sys/file.h syslog.h unistd.h assert.h sys/cdefs.h
    76  do
    77  as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    78  if eval "test \"\${$as_ac_Header+set}\" = set"; then
    79 @@ -23483,7 +23483,7 @@
    83 -for ac_func in asprintf dup2 fgetln gettimeofday memmove memset strcasecmp strchr strdup strncasecmp strtoul strspn getaddrinfo getnameinfo freeaddrinfo setgroups sendmsg recvmsg setregid setruid kqueue
    84 +for ac_func in asprintf dup2 fgetln gettimeofday memmove memset strcasecmp strchr strdup strncasecmp strtoul strspn getaddrinfo getnameinfo freeaddrinfo setgroups sendmsg recvmsg setregid setruid setenv kqueue
    85  do
    86  as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
    87  echo "$as_me:$LINENO: checking for $ac_func" >&5
    88 Index: dhcpclient.c
    89 --- dhcpclient.c.orig	2006-08-19 09:10:41 +0200
    90 +++ dhcpclient.c	2006-08-24 12:14:21 +0200
    91 @@ -94,6 +94,13 @@
    93  #define NTRIES 10
    95 +#ifndef MIN
    96 +# define MIN(a,b)	(((a) < (b)) ? (a) : (b))
    97 +#endif /* MIN */
    98 +#ifndef MAX
    99 +# define MAX(a,b)	(((a) > (b)) ? (a) : (b))
   100 +#endif /* MAX */
   101 +
   102  static int  _pack_request(struct dhcpclient_req *, void *, size_t *);
   103  static int  _pack_release(struct dhcpclient_req *, void *, size_t *);
   104  static int  _bcast(struct template *,
   105 Index: honeyd.c
   106 --- honeyd.c.orig	2006-08-19 09:14:36 +0200
   107 +++ honeyd.c	2006-08-24 12:14:21 +0200
   108 @@ -101,6 +101,9 @@
   109  #include "histogram.h"
   110  #include "update.h"
   111  #include "util.h"
   112 +#ifndef HAVE_SETENV
   113 +#include "setenv.h"
   114 +#endif
   116  #ifdef HAVE_PYTHON
   117  #include <Python.h>
   118 Index: honeyd_overload.c
   119 --- honeyd_overload.c.orig	2006-08-19 09:10:41 +0200
   120 +++ honeyd_overload.c	2006-08-24 12:14:21 +0200
   121 @@ -295,7 +295,7 @@
   122  	struct fd *nfd;
   123  	int pair[2];
   125 -	if (socketpair(AF_LOCAL, type, 0, pair) == -1) {
   126 +	if (socketpair(AF_UNIX, type, 0, pair) == -1) {
   127  		warn("%s: socketpair", __func__);
   128  		return (NULL);
   129  	}
   130 @@ -625,7 +625,7 @@
   131  	}
   133  	/* Get another socketpair */
   134 -	if (socketpair(AF_LOCAL, SOCK_STREAM, 0, pair) == -1) {
   135 +	if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) {
   136  		DPRINTF((stderr, "%s: socketpair failed", __func__));
   137  		errno = ETIMEDOUT; /* XXX */
   138  		return (-1);
   139 @@ -732,6 +732,7 @@
   140  }
   141  #endif /* !__FreeBSD__ */
   143 +#ifndef sun
   144  ssize_t
   145  recvfrom(int sock, void *buf, size_t len, int flags, struct sockaddr *from,
   146      socklen_t *fromlen)
   147 @@ -759,6 +760,7 @@
   148   out:
   149  	return (ret);
   150  }
   151 +#endif /* !sun */
   153  ssize_t
   154  sendto(int sock, const void *buf, size_t len, int flags,
   155 @@ -795,6 +797,7 @@
   156  	return (ret);
   157  }
   159 +#ifndef sun
   160  int
   161  getsockname(int sock, struct sockaddr *to, socklen_t *tolen)
   162  {
   163 @@ -832,6 +835,7 @@
   165  	return (0);
   166  }
   167 +#endif /* !sun */
   169  ssize_t
   170  recvmsg(int sock, struct msghdr *msg, int flags)
   171 @@ -1120,6 +1124,7 @@
   172  	return (ret);
   173  }
   175 +#ifndef sun
   176  int
   177  accept(int sock, struct sockaddr *addr, socklen_t *addrlen)
   178  {
   179 @@ -1169,6 +1174,7 @@
   181  	return (fd);
   182  }
   183 +#endif /* !sun */
   185  #if 0
   187 Index: personality.c
   188 --- personality.c.orig	2006-08-19 09:10:40 +0200
   189 +++ personality.c	2006-08-24 12:14:21 +0200
   190 @@ -32,6 +32,9 @@
   192  #include <sys/param.h>
   193  #include <sys/types.h>
   194 +#ifndef UINT_MAX
   195 +#define UINT_MAX    4294967295U
   196 +#endif
   198  #include "config.h"
   200 Index: pf_osfp.c
   201 --- pf_osfp.c.orig	2006-08-19 09:10:40 +0200
   202 +++ pf_osfp.c	2006-08-24 12:14:21 +0200
   203 @@ -50,6 +50,10 @@
   204  #  define DPFPRINTF(format, x...)	((void)0)
   205  # endif /* PFDEBUG */
   207 +#ifndef MAX
   208 +# define MAX(a,b)  (((a) > (b)) ? (a) : (b))
   209 +#endif
   210 +
   211  SLIST_HEAD(pf_osfp_list, pf_os_fingerprint) pf_osfp_list;
   212  pool_t pf_osfp_entry_pl;
   213  pool_t pf_osfp_pl;

mercurial