From a793c8047e6be1f740b2bb9fc54ac15fdb0e050a Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Sun, 2 Mar 2014 14:53:41 +0100 Subject: [PATCH] fixed some typos and minor issues, including Red Hat issue 1021967 --- CHANGES | 3 +++ README | 2 +- doc/socat.yo | 3 ++- test.sh | 5 ++++- xio-socket.c | 10 +++++----- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index efa4471..ddcb187 100644 --- a/CHANGES +++ b/CHANGES @@ -45,6 +45,9 @@ corrections: Red Hat issue 1021972: fixed a missing NUL termination in return string of sysutils.c:sockaddr_info() for the AF_UNIX case + fixed some typos and minor issues, including: + Red Hat issue 1021967: formatting error in manual page + porting: Performed changes for Fedora release 19 diff --git a/README b/README index e73a0e5..2bd0d54 100644 --- a/README +++ b/README @@ -190,7 +190,7 @@ platform specifics - hp-ux -------------------------- Ancillary messages cannot be compiled in with socat: both struct msghdr and -strutc cmsghdr are required. Compiling with -D_XOPEN_SOURCE_EXTENDED provides +struct cmsghdr are required. Compiling with -D_XOPEN_SOURCE_EXTENDED provides struct msghdr but disables struct cmsghdr while -D_OPEN_SOURCE disables struct msghdr but disables struct cmsghdr. Please contact socat development if you know a solution. diff --git a/doc/socat.yo b/doc/socat.yo index 4295ca1..248ed43 100644 --- a/doc/socat.yo +++ b/doc/socat.yo @@ -1708,7 +1708,8 @@ label(OPTION_SUBSTUSER)dit(bf(tt(su=))) Changes the link()(TYPE_USER) (owner) and groups of the process after processing the address (link(example)(EXAMPLE_OPTION_SUBSTUSER)). This call might require root privilege. label(OPTION_SUBSTUSER_DELAYED)dit(bf(tt(su-d=))) - Short name for bf(tt(substuser-delayed)). + Short name for tt(substuser-delayed). + COMMENT(Short name for bf(tt(substuser-delayed) ).) Changes the link()(TYPE_USER) (owner) and groups of the process after processing the address (link(example)(EXAMPLE_OPTION_SUBSTUSER_DELAYED)). The user and his groups are retrieved em(before) a possible diff --git a/test.sh b/test.sh index 5afa61a..a0f3df1 100755 --- a/test.sh +++ b/test.sh @@ -45,6 +45,9 @@ _MICROS=$((MICROS+999999)); SECONDs="${_MICROS%??????}" withroot=0 # perform privileged tests even if not run by root #PATH=$PATH:/opt/freeware/bin #PATH=$PATH:/usr/local/ssl/bin +case "$0" in + */*) PATH="${0%/*}:$PATH" +esac #OPENSSL_RAND="-rand /dev/egd-pool" #SOCAT_EGD="egd=/dev/egd-pool" MISCDELAY=1 @@ -224,7 +227,7 @@ ECHO="echo $E" PRINTF="printf" case "$TERM" in -vt100|vt320|linux|xterm|cons25|dtterm|aixterm|sun-color|xterm-color) +vt100|vt320|linux|xterm|cons25|dtterm|aixterm|sun-color|xterm-color|xterm-256color) # there are different behaviours of printf (and echo) # on some systems, echo behaves different than printf... if [ $($PRINTF "\0101") = "A" ]; then diff --git a/xio-socket.c b/xio-socket.c index 8988aed..d53ade0 100644 --- a/xio-socket.c +++ b/xio-socket.c @@ -1127,14 +1127,14 @@ void xiosigaction_hasread(int signum if (pid == 0) { Msg(wassig?E_INFO:E_WARN, "waitpid(-1, {}, WNOHANG): no child has exited"); - Info("childdied() finished"); + Info("xiosigaction_hasread() finished"); errno = _errno; Debug("xiosigaction_hasread() ->"); return; } else if (pid < 0 && errno == ECHILD) { Msg1(wassig?E_INFO:E_WARN, "waitpid(-1, {}, WNOHANG): %s", strerror(errno)); - Info("childdied() finished"); + Info("xiosigaction_hasread() finished"); errno = _errno; Debug("xiosigaction_hasread() ->"); return; @@ -1142,7 +1142,7 @@ void xiosigaction_hasread(int signum wassig = true; if (pid < 0) { Warn2("waitpid(-1, {%d}, WNOHANG): %s", status, strerror(errno)); - Info("childdied() finished"); + Info("xiosigaction_hasread() finished"); errno = _errno; Debug("xiosigaction_hasread() ->"); return; @@ -1735,7 +1735,7 @@ int xiocheckpeer(xiosingle_t *xfd, #if WITH_IP6 if (pa->soa.sa_family == AF_INET6 && ntohs(((struct sockaddr_in6 *)pa)->sin6_port) != xfd->para.socket.ip.sourceport) { - Warn1("refusing connection from %s due to sourceport option", + Warn1("refusing connection from %s due to wrong sourceport", sockaddr_info((struct sockaddr *)pa, 0, infobuff, sizeof(infobuff))); return -1; @@ -2085,7 +2085,7 @@ int xiosetsockaddrenv(const char *lr, /* these do sockets internally */ -/* retrieves options so-type and so-prototype from opts, calls socketpair, and +/* retrieves options so-type and so-prototype from opts, calls socket, and ev. generates an appropriate error message. returns 0 on success or -1 if an error occurred. */ int