mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
Under certain circumstances, options of the first address were applied to the second address
This commit is contained in:
parent
420835bf2a
commit
5ebf36038f
3 changed files with 41 additions and 1 deletions
6
CHANGES
6
CHANGES
|
@ -5,6 +5,12 @@ Corrections:
|
|||
Thanks to Joe Strout and others for reporting this bug.
|
||||
Thanks to Andrew Childs and others for sending a patch.
|
||||
|
||||
Under certain circumstances, termios options of the first address were
|
||||
applied to the second address, resulting in error
|
||||
"Inappropriate ioctl for device"
|
||||
This affected version 1.7.3.3 only.
|
||||
Thanks to Ivan J. for reporting this issue.
|
||||
|
||||
####################### V 1.7.3.3:
|
||||
|
||||
Corrections:
|
||||
|
|
34
test.sh
34
test.sh
|
@ -13027,6 +13027,40 @@ esac
|
|||
N=$((N+1))
|
||||
|
||||
|
||||
# test for a bug in Socat version 1.7.3.3 where
|
||||
# termios options of the first address were applied to the second address.
|
||||
NAME=TERMIOS_PH_ALL
|
||||
case "$TESTS" in
|
||||
*%$N%*|*%functions%*|*%bugs%*|*%termios%*|*%$NAME%*)
|
||||
TEST="$NAME: are termios options applied to the correct address"
|
||||
# add a termios option to the first address, a tty, and have a second address
|
||||
# with pipe. If no error occurs the termios option was not applied to the pipe,
|
||||
# thus the test succeeded.
|
||||
if ! eval $NUMCOND; then :; else
|
||||
tf="$td/test$N.stdout"
|
||||
te="$td/test$N.stderr"
|
||||
tdiff="$td/test$N.diff"
|
||||
da="test$N $(date) $RANDOM"
|
||||
CMD0="$TRACE $SOCAT $opts -T 1 STDIO,echo=0 EXEC:cat"
|
||||
printf "test $F_n $TEST... " $N
|
||||
$CMD0 2>"${te}0"
|
||||
rc0=$?
|
||||
if [ $rc0 -eq 0 ]; then
|
||||
$PRINTF "$OK\n"
|
||||
numOK=$((numOK+1))
|
||||
else
|
||||
$PRINTF "$FAILED\n"
|
||||
echo "$CMD0"
|
||||
numFAIL=$((numFAIL+1))
|
||||
listFAIL="$listFAIL $N"
|
||||
fi
|
||||
fi # NUMCOND
|
||||
;;
|
||||
esac
|
||||
PORT=$((PORT+1))
|
||||
N=$((N+1))
|
||||
|
||||
|
||||
##################################################################################
|
||||
#=================================================================================
|
||||
# here come tests that might affect your systems integrity. Put normal tests
|
||||
|
|
|
@ -3581,7 +3581,7 @@ int applyopts(int fd, struct opt *opts, enum e_phase phase) {
|
|||
}
|
||||
|
||||
#if WITH_TERMIOS
|
||||
if (phase == PH_FD) {
|
||||
if (phase == PH_FD || phase == PH_ALL) {
|
||||
xiotermios_flush(fd);
|
||||
}
|
||||
#endif /* WITH_TERMIOS */
|
||||
|
|
Loading…
Reference in a new issue