[BusyBox-cvs] [BusyBox 0000263]: nc cannot use -e when initiating a tcp connection to something else
bugs at busybox.net
bugs at busybox.net
Sun Jul 31 22:34:48 UTC 2005
The following issue has been CLOSED
======================================================================
http://busybox.net/bugs/view.php?id=263
======================================================================
Reported By: owlman
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 263
Category: Networking Support
Reproducibility: always
Severity: major
Priority: normal
Status: closed
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 05-19-2005 09:32 PDT
Last Modified: 07-31-2005 15:34 PDT
======================================================================
Summary: nc cannot use -e when initiating a tcp connection to
something else
Description:
Host A is a full linux.
Host B is a busybox.
A$ nc -l -p 3000
B$ nc -e /bin/sh A 3000
The connection goes up and immediately down, because the busybox nc
close()s stdin (filedescriptor 0), then socket()s the connection to the
next available filedescriptor (0), then starts the filedescriptor
duplication spree: dup2(0, 0); close(0); dup2(0,1); dup2(0,2).
The attached patch removes the first close()ing of stdin, because the
first dup2() does it for us
======================================================================
----------------------------------------------------------------------
pgf - 07-20-05 12:40
----------------------------------------------------------------------
Committed revision 10883.
Issue History
Date Modified Username Field Change
======================================================================
05-19-05 09:32 owlman New Issue
05-19-05 09:32 owlman File Added: nc.c.diff
05-19-05 09:33 owlman Issue Monitored: owlman
05-22-05 20:06 cwhite102 Issue Monitored: cwhite102
07-20-05 12:40 pgf Status assigned => resolved
07-20-05 12:40 pgf Resolution open => fixed
07-20-05 12:40 pgf Note Added: 0000326
07-31-05 15:34 vapier Status resolved => closed
======================================================================
More information about the busybox-cvs
mailing list