socks4echo.sh and socks4a-echo.sh hung with new bash with read -n

This commit is contained in:
Gerhard Rieger 2016-05-11 21:06:01 +02:00
parent aed0fcd79e
commit 38ce0b9b46
3 changed files with 13 additions and 8 deletions

View file

@ -1,4 +1,7 @@
testing:
socks4echo.sh and socks4a-echo.sh hung with new bash with read -n
####################### V 1.7.3.1: ####################### V 1.7.3.1:
security: security:

View file

@ -12,11 +12,12 @@
# socat tcp-l:1080,reuseaddr,crlf system:"socks4a-echo.sh" # socat tcp-l:1080,reuseaddr,crlf system:"socks4a-echo.sh"
# older bash and ksh do not have -n option to read command; we try dd then # older bash and ksh do not have -n option to read command; we try dd then
if echo a |read -n 1 null >/dev/null 2>&1; then #if echo a |read -n 1 null >/dev/null 2>&1; then
HAVE_READ_N=1 # HAVE_READ_N=1
else #else
# and newer bash (4.3) has some other problem with read -n
HAVE_READ_N= HAVE_READ_N=
fi #fi
if type socat >/dev/null 2>&1; then if type socat >/dev/null 2>&1; then
SOCAT=socat SOCAT=socat

View file

@ -11,11 +11,12 @@
# socat tcp-l:1080,reuseaddr,crlf system:"socks4echo.sh" # socat tcp-l:1080,reuseaddr,crlf system:"socks4echo.sh"
# older bash and ksh do not have -n option to read command; we try dd then # older bash and ksh do not have -n option to read command; we try dd then
if echo a |read -n 1 null >/dev/null 2>&1; then #if echo a |read -n 1 null >/dev/null 2>&1; then
HAVE_READ_N=1 # HAVE_READ_N=1
else #else
# and newer bash (4.3) has some other problem with read -n
HAVE_READ_N= HAVE_READ_N=
fi #fi
if type socat >/dev/null 2>&1; then if type socat >/dev/null 2>&1; then
SOCAT=socat SOCAT=socat