From b6541b4de7eea5ff6b688f62bdd913b65901da7b Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Sat, 24 Jan 2015 18:40:03 +0100 Subject: [PATCH] Final fixes before release 1.7.3.0 --- Makefile.in => Config/Makefile.NetBSD-5-1 | 67 ++-- Config/config.NetBSD-5-1.h | 522 ++++++++++++++++++++++++++++++ Makefile.in | 3 +- doc/socat.yo | 6 +- test.sh | 4 +- xio-openssl.c | 19 +- xioexit.c | 2 +- 7 files changed, 571 insertions(+), 52 deletions(-) copy Makefile.in => Config/Makefile.NetBSD-5-1 (79%) create mode 100644 Config/config.NetBSD-5-1.h diff --git a/Makefile.in b/Config/Makefile.NetBSD-5-1 similarity index 79% copy from Makefile.in copy to Config/Makefile.NetBSD-5-1 index 7d7771d..5f6256a 100644 --- a/Makefile.in +++ b/Config/Makefile.NetBSD-5-1 @@ -1,43 +1,43 @@ # source: Makefile.in -# Copyright Gerhard Rieger +# Copyright Gerhard Rieger 2001-2008 # Published under the GNU General Public License V.2, see file COPYING # note: @...@ forms are filled in by configure script SHELL = /bin/sh -AR = @AR@ -RANLIB = @RANLIB@ +AR = ar +RANLIB = ranlib .SUFFIXES: .c .o -prefix = @prefix@ -exec_prefix = @exec_prefix@ +prefix = /usr/local +exec_prefix = ${prefix} -BINDEST = @bindir@ +BINDEST = ${exec_prefix}/bin -datarootdir = @datarootdir@ -MANDEST = @mandir@ +datarootdir = ${prefix}/share +MANDEST = ${datarootdir}/man -srcdir = @srcdir@ -VPATH = @srcdir@ +srcdir = . -CC = @CC@ -CCOPTS = $(CCOPT) -SYSDEFS = @SYSDEFS@ -CPPFLAGS = -I. @CPPFLAGS@ +CC = gcc +CCOPTS = $(CCOPT) -Wall -Wno-parentheses + +SYSDEFS = +CPPFLAGS = -I. #0 INCLS = -I. @V_INCL@ -DEFS = @DEFS@ -LIBS = @LIBS@ -LDFLAGS = @LDFLAGS@ +DEFS = -DHAVE_CONFIG_H +LIBS = -lwrap -lutil -lssl +LDFLAGS = -INSTALL = @INSTALL@ +INSTALL = /usr/bin/install -c -#OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) @LIBOBJS@ +#OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) -#0 CFLAGS = @CFLAGS@ $(CCOPTS) $(DEFS) $(INCLS) -CFLAGS = @CFLAGS@ $(CCOPTS) $(DEFS) $(CPPFLAGS) +#0 CFLAGS = -O -D_GNU_SOURCE $(CCOPTS) $(DEFS) $(INCLS) +CFLAGS = -O -D_GNU_SOURCE $(CCOPTS) $(DEFS) $(CPPFLAGS) CLIBS = $(LIBS) #CLIBS = $(LIBS) -lm -lefence XIOSRCS = xioinitialize.c xiohelp.c xioparam.c xiodiag.c xioopen.c xioopts.c \ @@ -54,13 +54,13 @@ XIOSRCS = xioinitialize.c xiohelp.c xioparam.c xiodiag.c xioopen.c xioopts.c \ xio-pty.c xio-openssl.c xio-streams.c\ xio-ascii.c xiolockfile.c xio-tcpwrap.c xio-ext2.c xio-tun.c XIOOBJS = $(XIOSRCS:.c=.o) -UTLSRCS = error.c dalan.c procan.c procan-cdefs.c hostan.c fdname.c sysutils.c utils.c nestlex.c vsnprintf_r.c snprinterr.c @FILAN@ @SYCLS@ @SSLCLS@ +UTLSRCS = error.c dalan.c procan.c procan-cdefs.c hostan.c fdname.c sysutils.c utils.c nestlex.c filan.c sycls.c sslcls.c UTLOBJS = $(UTLSRCS:.c=.o) CFILES = $(XIOSRCS) $(UTLSRCS) socat.c procan_main.c filan_main.c OFILES = $(CFILES:.c=.o) PROGS = socat procan filan -HFILES = sycls.h sslcls.h error.h dalan.h procan.h filan.h hostan.h sysincludes.h xio.h xioopen.h sysutils.h utils.h nestlex.h vsnprintf_r.h snprinterr.h compat.h \ +HFILES = sycls.h sslcls.h error.h dalan.h procan.h filan.h hostan.h sysincludes.h xio.h xioopen.h sysutils.h utils.h nestlex.h compat.h \ xioconfig.h mytypes.h xioopts.h xiodiag.h xiohelp.h xiosysincludes.h \ xiomodes.h xiolayer.h xio-process.h xio-fd.h xio-fdnum.h xio-stdio.h \ xio-named.h xio-file.h xio-creat.h xio-gopen.h xio-pipe.h \ @@ -73,21 +73,15 @@ HFILES = sycls.h sslcls.h error.h dalan.h procan.h filan.h hostan.h sysincludes. xio-ascii.h xiolockfile.h xio-tcpwrap.h xio-ext2.h xio-tun.h -DOCFILES = README README.FIPS CHANGES FILES EXAMPLES PORTING SECURITY DEVELOPMENT doc/socat.yo doc/socat.1 doc/socat.html doc/xio.help FAQ BUGREPORTS COPYING COPYING.OpenSSL doc/dest-unreach.css doc/socat-openssltunnel.html doc/socat-multicast.html doc/socat-tun.html doc/socat-genericsocket.html -SHFILES = daemon.sh mail.sh ftp.sh readline.sh \ - socat_buildscript_for_android.sh +DOCFILES = README README.FIPS CHANGES FILES EXAMPLES PORTING SECURITY DEVELOPMENT doc/socat.yo doc/socat.1 doc/socat.html doc/xio.help FAQ BUGREPORTS COPYING COPYING.OpenSSL doc/dest-unreach.css doc/socat-openssltunnel.html doc/socat-multicast.html doc/socat-tun.html +SHFILES = daemon.sh mail.sh ftp.sh readline.sh TESTFILES = test.sh socks4echo.sh proxyecho.sh gatherinfo.sh readline-test.sh \ - proxy.sh socks4a-echo.sh + proxy.sh socks4a-echo.sh testcert.conf OSFILES = Config/Makefile.Linux-2-6-24 Config/config.Linux-2-6-24.h \ Config/Makefile.SunOS-5-10 Config/config.SunOS-5-10.h \ Config/Makefile.FreeBSD-6-1 Config/config.FreeBSD-6-1.h \ Config/Makefile.NetBSD-4-0 Config/config.NetBSD-4-0.h \ - Config/Makefile.NetBSD-5-1 Config/config.NetBSD-5-1.h \ - Config/Makefile.OpenBSD-4-3 Config/config.OpenBSD-4-3.h \ - Config/Makefile.AIX-5-3 Config/config.AIX-5-3.h \ - Config/Makefile.Cygwin-1-5-25 Config/config.Cygwin-1-5-25.h \ - Config/Makefile.MacOSX-10-5 Config/config.MacOSX-10-5.h \ - Config/Makefile.DragonFly-2-8-2 Config/config.DragonFly-2-8-2.h + Config/Makefile.OpenBSD-4-3 Config/config.OpenBSD-4-3.h all: progs doc @@ -115,12 +109,12 @@ depend: $(CFILES) $(HFILES) socat: socat.o libxio.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ socat.o libxio.a $(CLIBS) -PROCAN_OBJS=procan_main.o procan.o procan-cdefs.o hostan.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o +PROCAN_OBJS=procan_main.o procan.o procan-cdefs.o hostan.o error.o sycls.o sysutils.o utils.o procan: $(PROCAN_OBJS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(PROCAN_OBJS) $(CLIBS) filan: filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o $(CLIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o $(CLIBS) libxio.a: $(XIOOBJS) $(UTLOBJS) $(AR) r $@ $(XIOOBJS) $(UTLOBJS) @@ -157,8 +151,7 @@ socat.tar.bz2: socat.tar VERSION = `sed 's/"//g' VERSION` TARDIR = socat-$(VERSION) -socat.tar: configure.in configure Makefile.in config.h.in install-sh VERSION $(CFILES) $(HFILES) $(DOCFILES) $(SHFILES) $(OSFILES) $(TESTFILES) socat.spec \ - configure.ac +socat.tar: configure.in configure Makefile.in config.h.in install-sh VERSION $(CFILES) $(HFILES) $(DOCFILES) $(SHFILES) $(OSFILES) $(TESTFILES) socat.spec if [ ! -d $(TARDIR) ]; then mkdir $(TARDIR); fi tar cf - $+ |(cd $(TARDIR); tar xf -) tar cvf socat.tar $(TARDIR) diff --git a/Config/config.NetBSD-5-1.h b/Config/config.NetBSD-5-1.h new file mode 100644 index 0000000..27f18a9 --- /dev/null +++ b/Config/config.NetBSD-5-1.h @@ -0,0 +1,522 @@ +/* config.h. Generated from config.h.in by configure. */ +/* source: config.h.in */ +/* Copyright Gerhard Rieger 2001-2008 */ +/* Published under the GNU General Public License V.2, see file COPYING */ + +#ifndef __config_h_included +#define __config_h_included 1 + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define to `int' if doesn't define. */ +/* #undef gid_t */ + +/* Define if your struct stat has st_blksize. */ +#define HAVE_ST_BLKSIZE 1 + +/* Define if your struct stat has st_blocks. */ +#define HAVE_ST_BLOCKS 1 + +/* Define if your struct stat has st_rdev. */ +#define HAVE_ST_RDEV 1 + +/* Define if you have the strftime function. */ +#define HAVE_STRFTIME 1 + +/* Define if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to `int' if doesn't define. */ +/* #undef mode_t */ + +/* Define to `long' if doesn't define. */ +/* #undef off_t */ + +/* Define to `int' if doesn't define. */ +/* #undef pid_t */ + +/* Define as the return type of signal handlers (int or void). */ +#define RETSIGTYPE void + +/* Define to `unsigned' if doesn't define. */ +/* #undef size_t */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to `int' if doesn't define. */ +/* #undef uid_t */ + +/* Define if you have the putenv function. */ +#define HAVE_PUTENV 1 + +/* Define if you have the select function. */ +#define HAVE_SELECT 1 + +/* Define if you have the poll function. */ +#define HAVE_POLL 1 + +/* Define if you have the socket function. */ +#define HAVE_SOCKET 1 + +/* Define if you have the strdup function. */ +#define HAVE_STRDUP 1 + +/* Define if you have the strerror function. */ +#define HAVE_STRERROR 1 + +/* Define if you have the strstr function. */ +#define HAVE_STRSTR 1 + +/* Define if you have the strtod function. */ +#define HAVE_STRTOD 1 + +/* Define if you have the strtol function. */ +#define HAVE_STRTOL 1 + +/* Define if you have the strtoul function. */ +#define HAVE_STRTOUL 1 + +/* Define if you have the uname function. */ +#define HAVE_UNAME 1 + +/* Define if you have the getpgid function. */ +#define HAVE_GETPGID 1 + +/* Define if you have the getsid function. */ +#define HAVE_GETSID 1 + +/* Define if you have the nanosleep function. */ +#define HAVE_NANOSLEEP 1 + +/* Define if you have the getaddrinfo function. */ +#define HAVE_GETADDRINFO 1 + +/* Define if you have the getipnodebyname function. */ +/* #undef HAVE_GETIPNODEBYNAME */ + +/* Define if you have the setgroups function. */ +#define HAVE_SETGROUPS 1 + +/* Define if you have the inet_aton function. */ +#define HAVE_INET_ATON 1 + +/* Define if you have the memrchr function. */ +/* #undef HAVE_MEMRCHR */ + +/* Define if you have the if_indextoname function. */ +#define HAVE_IF_INDEXTONAME 1 + +/* Define if you have the sigaction function */ +#define HAVE_SIGACTION 1 + +/* Define if you have the stat64 function */ +/* #undef HAVE_STAT64 */ + +/* Define if you have the fstat64 function */ +/* #undef HAVE_FSTAT64 */ + +/* Define if you have the lstat64 function */ +/* #undef HAVE_LSTAT64 */ + +/* Define if you have the lseek64 function */ +/* #undef HAVE_LSEEK64 */ + +/* Define if you have the truncate64 function */ +/* #undef HAVE_TRUNCATE64 */ + +/* Define if you have the ftruncate64 function */ +/* #undef HAVE_FTRUNCATE64 */ + +/* Define if you have the strtoll function */ +#define HAVE_STRTOLL 1 + +/* Define if you have the hstrerror function */ +#define HAVE_HSTRERROR 1 + +/* Define if you have the inet_ntop function */ +#define HAVE_INET_NTOP 1 + +/* Define if you have the hstrerror prototype */ +#define HAVE_PROTOTYPE_HSTRERROR 1 + +/* Define if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYSLOG_H 1 + +/* Define if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if you have the header file. */ +#define HAVE_PWD_H 1 + +/* Define if you have the header file. */ +#define HAVE_GRP_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_POLL_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_UN_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_PTY_H */ + +/* Define if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define if you have the header file. */ +#define HAVE_NETINET_IN_SYSTM_H 1 + +/* Define if you have the header file. */ +#define HAVE_NETINET_IP_H 1 + +/* Define if you have the header file. */ +#define HAVE_NETINET_TCP_H 1 + +/* Define if you have the header file. */ +#define HAVE_NETINET_IP6_H 1 + +/* Define if you have the header file. */ +#define HAVE_ARPA_NAMESER_H 1 + +/* Define if you have the header file. */ +#define HAVE_RESOLV_H 1 + +/* Define if you have the header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define if you have the header file. */ +#define HAVE_NET_IF_H 1 + +/* Define if you have the header file. */ +#define HAVE_NET_IF_DL_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_LINUX_TYPES_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_LINUX_ERRQUEUE_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_LINUX_IF_TUN_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_NETPACKET_PACKET_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_NETINET_IF_ETHER_H */ + +/* Define if you have the header file. */ +#define HAVE_SYS_UTSNAME_H 1 + +/* Define if you have the header file. (AIX) */ +#define HAVE_SYS_SELECT_H 1 + +/* Define if you have the header file. (AIX) */ +#define HAVE_SYS_FILE_H 1 + +/* Define if you have the header file. (NetBSD, OpenBSD: openpty()) */ +#define HAVE_UTIL_H 1 + +/* Define if you have the header file. (FreeBSD: openpty()) */ +/* #undef HAVE_LIBUTIL_H */ + +/* Define if you have the header file. (stream opts on SunOS)*/ +/* #undef HAVE_SYS_STROPTS_H */ + +/* Define if you have the header file. */ +#define HAVE_REGEX_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_LINUX_FS_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_LINUX_EXT2_FS_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_READLINE_READLINE_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_READLINE_HISTORY_H */ + +/* Define if you have the readline library. */ +/* #undef HAVE_LIBREADLINE */ + +/* Define if you have the m library (-lm). */ +/* #undef HAVE_LIBM */ + +/* Define if you have the floor function */ +/* #undef HAVE_FLOOR */ + +/* some platforms need _XOPEN_EXTENDED_SOURCE to get syslog headers (AIX4.1) */ +/* #undef _XOPEN_EXTENDED_SOURCE */ + +/* fdset may have component fds_bits or __fds_bits */ +#define HAVE_FDS_BITS 1 + +/* Define if you have the sa_family_t */ +#define HAVE_TYPE_SA_FAMILY_T 1 + +/* define if your struct sigaction has sa_sigaction */ +#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1 + +/* Define if your struct termios has component c_ispeed */ +#define HAVE_TERMIOS_ISPEED 1 + +/* the offset of c_ispeed in struct termios - usable in an speed_t array. + Applies only when HAVE_TERMIOS_ISPEED is set */ +#define ISPEED_OFFSET 9 + +/* the offset of c_ospeed in struct termios - see ISPEED_OFFSET */ +#ifdef ISPEED_OFFSET +# define OSPEED_OFFSET (ISPEED_OFFSET+1) +#else +/* # undef OSPEED_OFFSET */ +#endif + +/* Define if your termios.h likes _SVID3 defined */ +/* #undef _SVID3 */ + +/* Define if you have struct timespec (e.g. for nanosleep) */ +#define HAVE_STRUCT_TIMESPEC 1 + +/* Define if you have struct linger */ +#define HAVE_STRUCT_LINGER 1 + +/* Define if you have struct ip_mreq */ +#define HAVE_STRUCT_IP_MREQ 1 + +/* Define if you have struct ip_mreqn */ +/* #undef HAVE_STRUCT_IP_MREQN */ + +/* Define if you have struct ipv6_mreq */ +#define HAVE_STRUCT_IPV6_MREQ 1 + +/* Define if you have struct ifreq */ +#define HAVE_STRUCT_IFREQ 1 + +/* Define if you have struct ifreq.ifr_index */ +/* #undef HAVE_STRUCT_IFREQ_IFR_INDEX */ + +/* Define if you have struct ifreq.ifr_ifindex; not on HPUX */ +/* #undef HAVE_STRUCT_IFREQ_IFR_IFINDEX */ + +/* Define if your struct sockaddr has sa_len */ +#define HAVE_STRUCT_SOCKADDR_SALEN 1 + +/* there are several implementations of sockaddr_in6 */ +#define HAVE_IP6_SOCKADDR 0 + +/* Define if you have struct iovec */ +#define HAVE_STRUCT_IOVEC 1 + +/* define if your struct msghdr has msg_control */ +#define HAVE_STRUCT_MSGHDR_MSGCONTROL 1 + +/* define if your struct msghdr has msg_controllen */ +#define HAVE_STRUCT_MSGHDR_MSGCONTROLLEN 1 + +/* define if your struct msghdr has msg_flag */ +#define HAVE_STRUCT_MSGHDR_MSGFLAGS 1 + +/* define if you have struct cmsghdr */ +#define HAVE_STRUCT_CMSGHDR 1 + +/* define if you have struct in_pktinfo */ +/* #undef HAVE_STRUCT_IN_PKTINFO */ + +/* define if your struct ip has ip_hl; otherwise assume ip_vhl */ +#define HAVE_STRUCT_IP_IP_HL 1 + +/* Define if you have the setenv function */ +#define HAVE_SETENV 1 + +/* Define if you have the unsetenv function. not on HP-UX */ +#define HAVE_UNSETENV 1 + +/* Define if you have the flock function */ +#define HAVE_FLOCK 1 + +/* Define if you have the openpty function */ +#define HAVE_OPENPTY 1 + +/* Define if you have the grantpt function */ +#define HAVE_GRANTPT 1 + +/* Define if you have the unlockpt function */ +#define HAVE_UNLOCKPT 1 + +/* Define if you have the ptsname function */ +#define HAVE_PTSNAME 1 + +/* Define if you have the /dev/ptmx pseudo terminal multiplexer */ +#define HAVE_DEV_PTMX 1 + +/* Define if you have the /dev/ptc pseudo terminal multiplexer */ +/* #undef HAVE_DEV_PTC */ + +/* Define if you have the long long type */ +#define HAVE_TYPE_LONGLONG 1 + +/* is socklen_t already typedef'd? */ +#define HAVE_TYPE_SOCKLEN 1 + +/* Define if you have the struct stat64 type */ +/* #undef HAVE_TYPE_STAT64 */ + +/* Define if you have the struct off64_t type */ +/* #undef HAVE_TYPE_OFF64 */ + +/* is sighandler_t already typedef'd? */ +/* #undef HAVE_TYPE_SIGHANDLER */ + +/* is uint8_t already defined? */ +#define HAVE_TYPE_UINT8 1 + +/* is uint16_t already defined? */ +#define HAVE_TYPE_UINT16 1 + +/* is uint32_t already defined? */ +#define HAVE_TYPE_UINT32 1 + +/* is uint64_t already defined? */ +#define HAVE_TYPE_UINT64 1 + +/* Define if you have the printf "Z" modifier */ +/* #undef HAVE_FORMAT_Z */ + +/* Define the shift offset of the CRDLY mask */ +#define CRDLY_SHIFT -1 + +/* Define the shift offset of the TABDLY mask */ +#define TABDLY_SHIFT -1 + +/* Define the shift offset of the CSIZE mask */ +#define CSIZE_SHIFT 8 + +/* Define if you have tcpwrappers (libwrap, tcpd) and it declares hosts_allow_table */ +#define HAVE_HOSTS_ALLOW_TABLE 1 +#if defined(HAVE_HOSTS_ALLOW_TABLE) && HAVE_HOSTS_ALLOW_TABLE +# define HAVE_HOSTS_DENY_TABLE 1 +#else +/* # undef HAVE_HOSTS_DENY_TABLE */ +#endif + +/* 1..short, 3..int, 5..long; 2,4,6..unsigned */ +#define HAVE_BASIC_SIZE_T 4 /* unsigned int */ +#define HAVE_BASIC_MODE_T 4 /* unsigned int */ +#define HAVE_BASIC_PID_T 3 /* int */ +#define HAVE_BASIC_UID_T 4 /* unsigned int */ +#define HAVE_BASIC_GID_T 4 /* unsigned int */ +#define HAVE_BASIC_TIME_T 5 /* long */ +#define HAVE_BASIC_OFF64_T 0 /* unknown, taking default */ + +#define HAVE_BASIC_SOCKLEN_T 4 /* unsigned int */ + +#define HAVE_TYPEOF_ST_DEV 4 /* unsigned int */ +#define HAVE_TYPEOF_ST_INO 8 /* unsigned long long */ +#define HAVE_TYPEOF_ST_NLINK 4 /* unsigned int */ +#define HAVE_TYPEOF_ST_SIZE 7 /* long long */ +#define HAVE_TYPEOF_ST_BLKSIZE 4 /* unsigned int */ +#define HAVE_TYPEOF_ST_BLOCKS 7 /* long long */ + +/* #undef HAVE_TYPEOF_ST64_DEV */ +/* #undef HAVE_TYPEOF_ST64_INO */ +/* #undef HAVE_TYPEOF_ST64_NLINK */ +/* #undef HAVE_TYPEOF_ST64_SIZE */ +/* #undef HAVE_TYPEOF_ST64_BLKSIZE */ +/* #undef HAVE_TYPEOF_ST64_BLOCKS */ + +#define HAVE_TYPEOF_STRUCT_TIMEVAL_TV_USEC 5 /* long */ + +#define HAVE_TYPEOF_RLIM_MAX 7 /* long long */ + +/* Define if you have the /proc filesystem */ +#define HAVE_PROC_DIR 1 + +/* Define if you have the /proc/$$/fd directories */ +/* #undef HAVE_PROC_DIR_FD */ + +#define WITH_HELP 1 +#define WITH_STDIO 1 +#define WITH_FDNUM 1 +#define WITH_FILE 1 +#define WITH_CREAT 1 +#define WITH_GOPEN 1 +#define WITH_TERMIOS 1 +#define WITH_PIPE 1 +#define WITH_UNIX 1 +/* #undef WITH_ABSTRACT_UNIXSOCKET */ +#define WITH_IP4 1 +#define WITH_IP6 1 +#define WITH_RAWIP 1 +#define WITH_GENERICSOCKET 1 +/* #undef WITH_INTERFACE */ +#define WITH_TCP 1 +#define WITH_UDP 1 +/* #undef WITH_SCTP */ +#define WITH_LISTEN 1 +#define WITH_SOCKS4 1 +#define WITH_SOCKS4A 1 +#define WITH_PROXY 1 +#define WITH_EXEC 1 +#define WITH_SYSTEM 1 +/* #undef WITH_READLINE */ +/* #undef WITH_TUN */ +#define WITH_PTY 1 +#define WITH_EXT2 1 +#define WITH_OPENSSL 1 +#define WITH_STREAMS 1 +/* #undef WITH_FIPS */ +/* #undef OPENSSL_FIPS */ +#define WITH_LIBWRAP 1 +#define HAVE_TCPD_H 1 +#define HAVE_LIBWRAP 1 + +#define WITH_SYCLS 1 +#define WITH_FILAN 1 +#define WITH_RETRY 1 + +#define WITH_MSGLEVEL 0 + +#endif /* !defined(__config_h_included) */ diff --git a/Makefile.in b/Makefile.in index 7d7771d..f2a6edb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -81,8 +81,7 @@ TESTFILES = test.sh socks4echo.sh proxyecho.sh gatherinfo.sh readline-test.sh \ OSFILES = Config/Makefile.Linux-2-6-24 Config/config.Linux-2-6-24.h \ Config/Makefile.SunOS-5-10 Config/config.SunOS-5-10.h \ Config/Makefile.FreeBSD-6-1 Config/config.FreeBSD-6-1.h \ - Config/Makefile.NetBSD-4-0 Config/config.NetBSD-4-0.h \ - Config/Makefile.NetBSD-5-1 Config/config.NetBSD-5-1.h \ + Config/Makefile.NetBSD-5-1 Config/config.NetBSD-5-1.h \ Config/Makefile.OpenBSD-4-3 Config/config.OpenBSD-4-3.h \ Config/Makefile.AIX-5-3 Config/config.AIX-5-3.h \ Config/Makefile.Cygwin-1-5-25 Config/config.Cygwin-1-5-25.h \ diff --git a/doc/socat.yo b/doc/socat.yo index afeaf3a..cea551b 100644 --- a/doc/socat.yo +++ b/doc/socat.yo @@ -10,7 +10,7 @@ def(Filan)(0)(bf(Filan)) def(procan)(0)(bf(procan)) def(Procan)(0)(bf(Procan)) -manpage(socat)(1)(Mar 2014)()() +manpage(socat)(1)()()() whenhtml( label(CONTENTS) @@ -3030,7 +3030,7 @@ label(EXAMPLE_OPTION_ESCAPE) dit(bf(tt(socat -,escape=0x0f /dev/ttyS0,rawer,crnl))) opens an interactive connection via the serial line, e.g. for talking with a -modem. link(rawer)(OPTION_TERMIOS_RAWER) and link(echo)(OPTION_ECHO) set the console's and +modem. link(rawer)(OPTION_TERMIOS_RAWER) sets the console's and ttyS0's terminal parameters to practicable values, link(crnl)(OPTION_CRNL) converts to correct newline characters. link(escape)(OPTION_ESCAPE) allows to terminate the socat process with character control-O. @@ -3165,7 +3165,7 @@ device (link(PTY)(ADDRESS_PTY)) on the client that can be reached under the symbolic link(link)(OPTION_SYMBOLIC_LINK) file($HOME/dev/vmodem0). An application that expects a serial line or modem can be configured to use file($HOME/dev/vmodem0); its traffic will be directed -to a modemserver via ssh where another socat instance links it with +to a modemserver via ssh where another socat instance links it to file(/dev/ttyS0). diff --git a/test.sh b/test.sh index dd3843a..65d93ec 100755 --- a/test.sh +++ b/test.sh @@ -1770,6 +1770,7 @@ runsip4 () { SunOS) l=$($IFCONFIG -a |grep 'inet ') ;; Darwin)l=$($IFCONFIG lo0 |fgrep 'inet 127.0.0.1 ') ;; DragonFly)l=$($IFCONFIG -a |fgrep 'inet 127.0.0.1 ');; + CYGWIN*) l=$(ipconfig |grep IPv4);; *) l=$($IFCONFIG -a |grep ' ::1[^:0-9A-Fa-f]') ;; esac [ -z "$l" ] && return 1 @@ -1796,6 +1797,7 @@ runsip6 () { OSF1) l=$($IFCONFIG -a |grep ' inet6 ') ;; SunOS) l=$($IFCONFIG -a |grep 'inet6 ') ;; Darwin)l=$($IFCONFIG lo0 |grep 'inet6 ::1 ') ;; + CYGWIN*) l=$(ipconfig |grep IPv6);; *) l=$($IFCONFIG -a |grep ' ::1[^:0-9A-Fa-f]') ;; esac [ -z "$l" ] && return 1 @@ -2142,7 +2144,7 @@ waittcp6port () { done $ECHO "!port $port timed out! \c" >&2 - echo set ${vx}vx >&2 + #echo set ${vx}vx >&2 set ${vx}vx return 1 } diff --git a/xio-openssl.c b/xio-openssl.c index abc347c..665430d 100644 --- a/xio-openssl.c +++ b/xio-openssl.c @@ -806,7 +806,9 @@ int Error1("openssl-method=\"%s\": method unknown or not provided by library", me_str); } } else { -#if HAVE_TLSv1_2_client_method +#if HAVE_SSLv23_client_method + method = sycSSLv23_client_method(); +#elif HAVE_TLSv1_2_client_method method = sycTLSv1_2_client_method(); #elif HAVE_TLSv1_1_client_method method = sycTLSv1_1_client_method(); @@ -814,8 +816,6 @@ int method = sycTLSv1_client_method(); #elif HAVE_SSLv3_client_method method = sycSSLv3_client_method(); -#elif HAVE_SSLv23_client_method - method = sycSSLv23_client_method(); #elif HAVE_SSLv2_client_method method = sycSSLv2_client_method(); #else @@ -859,16 +859,16 @@ int Error1("openssl-method=\"%s\": method unknown or not provided by library", me_str); } } else { -#if HAVE_TLSv1_2_server_method +#if HAVE_SSLv23_server_method + method = sycSSLv23_server_method(); +#elif HAVE_TLSv1_2_server_method method = sycTLSv1_2_server_method(); #elif HAVE_TLSv1_1_server_method method = sycTLSv1_1_server_method(); #elif HAVE_TLSv1_server_method - method = sycTLSv1_1_method(); + method = sycTLSv1_server_method(); #elif HAVE_SSLv3_server_method method = sycSSLv3_server_method(); -#elif HAVE_SSLv23_server_method - method = sycSSLv23_server_method(); #elif HAVE_SSLv2_server_method method = sycSSLv2_server_method(); #else @@ -960,6 +960,7 @@ int } } +#if defined(EC_KEY) /* not on Openindiana 5.11 */ { /* see http://openssl.6102.n7.nabble.com/Problem-with-cipher-suite-ECDHE-ECDSA-AES256-SHA384-td42229.html */ int nid; @@ -981,6 +982,7 @@ int SSL_CTX_set_tmp_ecdh(*ctx, ecdh); } +#endif /* !defined(EC_KEY) */ #if OPENSSL_VERSION_NUMBER >= 0x00908000L if (opt_compress) { @@ -1206,9 +1208,10 @@ static int openssl_setenv_cert_name(const char *field, X509_NAME *name) { BIO_free(bio); return -1; } + memcpy(str, buf, len); str[len] = '\0'; Info2("SSL peer cert %s: \"%s\"", field, buf); - xiosetenv2("OPENSSL_X509", field, buf, 1, NULL); + xiosetenv2("OPENSSL_X509", field, str, 1, NULL); free(str); BIO_free(bio); return 0; diff --git a/xioexit.c b/xioexit.c index 65b4752..35ed78f 100644 --- a/xioexit.c +++ b/xioexit.c @@ -1,5 +1,5 @@ /* source: xioexit.c */ -/* Copyright Gerhard Rieger 2001-2012 */ +/* Copyright Gerhard Rieger */ /* Published under the GNU General Public License V.2, see file COPYING */ /* this file contains the source for the extended exit function */ -- 2.11.4.GIT