From 38ce0b9b46de413d581eb7bbb37c6105e0b5d5ab Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Wed, 11 May 2016 21:06:01 +0200 Subject: [PATCH] socks4echo.sh and socks4a-echo.sh hung with new bash with read -n --- CHANGES | 3 +++ socks4a-echo.sh | 9 +++++---- socks4echo.sh | 9 +++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index ab611ff..c026dbe 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,7 @@ +testing: + socks4echo.sh and socks4a-echo.sh hung with new bash with read -n + ####################### V 1.7.3.1: security: diff --git a/socks4a-echo.sh b/socks4a-echo.sh index 5369c83..8767e32 100755 --- a/socks4a-echo.sh +++ b/socks4a-echo.sh @@ -12,11 +12,12 @@ # 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 -if echo a |read -n 1 null >/dev/null 2>&1; then - HAVE_READ_N=1 -else +#if echo a |read -n 1 null >/dev/null 2>&1; then +# HAVE_READ_N=1 +#else + # and newer bash (4.3) has some other problem with read -n HAVE_READ_N= -fi +#fi if type socat >/dev/null 2>&1; then SOCAT=socat diff --git a/socks4echo.sh b/socks4echo.sh index 348367a..aa19736 100755 --- a/socks4echo.sh +++ b/socks4echo.sh @@ -11,11 +11,12 @@ # 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 -if echo a |read -n 1 null >/dev/null 2>&1; then - HAVE_READ_N=1 -else +#if echo a |read -n 1 null >/dev/null 2>&1; then +# HAVE_READ_N=1 +#else + # and newer bash (4.3) has some other problem with read -n HAVE_READ_N= -fi +#fi if type socat >/dev/null 2>&1; then SOCAT=socat