#481068 socat: not backward compatible option processing

Package:
socat
Source:
socat
Description:
multipurpose relay for bidirectional data transfer
Submitter:
Václav Ovsík
Date:
2010-03-17 03:21:08 UTC
Severity:
normal
#481068#5
Date:
2008-05-13 13:38:27 UTC
From:
To:
Package: socat
Version: 1.6.0.1-1
Severity: normal

Hi,
after upgrade from Etch to Sid - socat 1.4.3.1 -> 1.6.0.1 I have
problems with existing scripts using socat:

SYSTEM:<shell-command> address
nothing changed in man-page concerning this address, but
meta-characters needs to be double-escaped?:

   SYSTEM:<shell-command>
	  Forks a sub process that establishes communication with its par-
	  ent process and invokes the  specified  program  with  system().
	  Please  note  that <shell-command> [string] must not contain ','
	  or "!!", and that shell meta characters  may  have  to  be  pro-
	  tected.   After  successful  program start, socat writes data to
	  stdin of the process and reads from its stdout.
	  Option groups: FD,SOCKET,EXEC,FORK,TERMIOS
	  Useful options: path, fdin, fdout,  chroot,  su,  su-d,  nofork,
	  pty, stderr, ctty, setsid, pipes, sigint, sigquit
	  See also: EXEC

zito@bobek:~$ socat -V|head -2
socat by Gerhard Rieger - see www.dest-unreach.org
socat version 1.6.0.1 on Feb 28 2008 14:11:41
zito@bobek:~$ socat SYSTEM:"ssh ns hostname\;hostname" STDOUT
ns
bobek
zito@bobek:~$ socat SYSTEM:"ssh ns hostname\\\;hostname" STDOUT
ns
ns
zito@bobek:~$

Stable system (Etch):

zito@fog:~$ socat -V|head -2
socat by Gerhard Rieger - see www.dest-unreach.org
socat version 1.4.3.1 on Apr 13 2006 15:56:26
zito@fog:~$ socat SYSTEM:"ssh ns hostname\;hostname" STDOUT
ns
ns
zito@fog:~$ socat SYSTEM:"ssh ns hostname\\\;hostname" STDOUT
ns
fog
zito@fog:~$


If this incompatible option processing changes are intentional, than there
should be red warning about it, at least notice in README.Debian or so.

#481068#14
Date:
2010-03-03 23:14:50 UTC
From:
To:
tags 481068 + moreinfo unreproducible
kthxbye

Hello,

It seems to work fine for me with the latest version of socat. Could you verify whether this is still the case?

Thanks,
Chris

#481068#19
Date:
2010-03-15 23:40:37 UTC
From:
To:
close 481068
thanks

It works for me, and after nearly 2 weeks without a response from the
bug submitter I am going to close this bug. If this is in error feel
free to re-open it and provide more information.

#481068#26
Date:
2010-03-16 08:24:44 UTC
From:
To:
Hi,

Sorry, I didn't receive the previous update. BTS is not sending to
submitter by itself AFAIK and I was not subscribed to bug explicitly...

OK. I try reproduce the problem without confusing ssh call this time:

On the Etch:

zito@nagios:~$ socat -V|head -2
socat by Gerhard Rieger - see www.dest-unreach.org
socat version 1.4.3.1 on Apr 13 2006 15:56:26
zito@nagios:~$ socat SYSTEM:'printf "%b" "1\n2\n3\n"' STDOUT
1
2
3
zito@nagios:~$

On the Sid:

zito@bobek:~$ socat -V|head -2
socat by Gerhard Rieger - see www.dest-unreach.org
socat version 1.7.1.2 on Feb 11 2010 19:13:27
zito@bobek:~$ socat SYSTEM:'printf "%b" "1\n2\n3\n"' STDOUT
1sh: line 1: 2: command not found
sh: line 2: 3: command not found
zito@bobek:~$

I think the problem still exists...
Regards

#481068#31
Date:
2010-03-17 03:17:07 UTC
From:
To:
reopen 481068
thanks


Heya,

Václav Ovsík wrote:

Sorry about that, I will be sure to CC you from now on.

Definitely the output that would be expected.

Hmm, that doesn't seem like the right thing.

I agree, I believe that it does. I will try to look into this more as
soon as I have time.


Thanks,
Chris