Bash /dev/tcp and /dev/udp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, from the bash manpage: /dev/tcp/host/port If host is a valid hostname or Internet address, and port is an integer port number or service name, bash attempts to open a TCP connection to the corresponding socket. /dev/udp/host/port If host is a valid hostname or Internet address, and port is an integer port number or service name, bash attempts to open a UDP connection to the corresponding socket. But this feature doesn't work on debian systems (on other distributions it works and is not a problem). For this feature there are several scripts and tools around which use this feature. Moreover if you want to make a net boot image where you need to contact a other host easy there is no way to do this with debian Linux so I have to switch to an other distribution like RedHat or even Susi^He. The related bug report is tagged as wontfix (146464) but this is absolute not reasonable. Best wishes Klaus Ethgen - -- Klaus Ethgenhttp://www.ethgen.de/ pub 2048R/D1A4EDE5 2000-02-26 Klaus Ethgen <[EMAIL PROTECTED]> Fingerprint: D7 67 71 C4 99 A6 D4 FE EA 40 30 57 3C 88 26 2B -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) iQEVAwUBRWWGQJ+OKpjRpO3lAQL70Af9GwGu/sJ8nes8Nh6fRxpW6nsNuFwvqWAt vMBosAmSBdpZWtUoOkCE2Figm+csHML1GDeLn7P9RCcTfzgoVPGpXqlgBG3bAokS FNU36wOwEQQ/1G1+daCvUmSsqMsyIGt6DNrRNr7q3wfHjPJXPiXJbAOQfvAh9LRT 5tk67EamhLoebVxSdC3wSc/d/dDlm/53L9v5oPeGceZrmqkqjovXTeAjIUkGehd5 j43DKEnUaSIEAsNDRvy6EyHy6zrVeoYQHainNqCTqhKg2MBmjCYa/ORkm8tpJtnt Tsjf54pg8V8PuUE3ChcKJ+pg/WxgToZQHfF6QUCunDLwiGlRXVp6+w== =PHYH -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Bash /dev/tcp and /dev/udp
On Thu, Nov 23, 2006 at 12:30:09PM +0100, Klaus Ethgen wrote: > For this feature there are several scripts and tools around which use > this feature. Moreover if you want to make a net boot image where you > need to contact a other host easy there is no way to do this with debian > Linux so I have to switch to an other distribution like RedHat or even > Susi^He. Of course there is. Using netcat, telnet, ftp, tftp, or similar. Yes it is a shame this isn't available, but it isn't something that you should switch distribution over. If its that important rebuilding the package with it enabled wouldn't take more than an hour .. > The related bug report is tagged as wontfix (146464) but this is absolute > not reasonable. You might disagree with the decision of the maintainer but this isn't an unreasonable action at all. Steve -- signature.asc Description: Digital signature
Re: Bash /dev/tcp and /dev/udp
On Thu, Nov 23, 2006 at 12:30:09PM +0100, Klaus Ethgen wrote: > Hi all, > > from the bash manpage: > /dev/tcp/host/port > If host is a valid hostname or Internet address, and port > is an integer port number or service name, bash attempts > to open a TCP connection to the corresponding socket. > /dev/udp/host/port > If host is a valid hostname or Internet address, and port > is an integer port number or service name, bash attempts > to open a UDP connection to the corresponding socket. > > But this feature doesn't work on debian systems (on other distributions > it works and is not a problem). > > For this feature there are several scripts and tools around which use > this feature. Moreover if you want to make a net boot image where you > need to contact a other host easy there is no way to do this with debian > Linux so I have to switch to an other distribution like RedHat or even > Susi^He. > > The related bug report is tagged as wontfix (146464) but this is absolute > not reasonable. > > Best wishes Hi Klaus, If the bash source package can be recompiled to enable these options, then that would seem to the most reasonable and easy course. If they do not allow this at all or in a reasonable manner, then that would be a bit more of a complex issue to tackle for you. Now if you would like to see these options on the bash source package changed, then you have a more difficult road. From my bits of information, you have these paths: -- convince the Debian package maintainer to agree with your position, relabel the bug to something other than wontfix and give him/her time to fix it -- somehow become the Debian maintainer -- ask the Debian technical committee for a hearing on the matter My hunch is that this is a decided issue within Debian. :-( You can ask for a hearing and see what they say as that is the most likely option to succeed apart from making your own debian package of bash. cheers, Kev ps. all of these things should be in the Debian developers reference and/or Debian policy manual -- | .''`. == Debian GNU/Linux == | my web site: | | : :' : The Universal | debian.home.pipeline.com | | `. `' Operating System| go to counter.li.org and | | `-http://www.debian.org/ |be counted! #238656 | | my keysever: pgp.mit.edu | my NPO: cfsg.org | signature.asc Description: Digital signature
Re: Bash /dev/tcp and /dev/udp
On 2006-11-23, Klaus Ethgen wrote: > > Hi all, > > from the bash manpage: > /dev/tcp/host/port > If host is a valid hostname or Internet address, and port > is an integer port number or service name, bash attempts > to open a TCP connection to the corresponding socket. > /dev/udp/host/port > If host is a valid hostname or Internet address, and port > is an integer port number or service name, bash attempts > to open a UDP connection to the corresponding socket. > > But this feature doesn't work on debian systems (on other distributions > it works and is not a problem). Hammer for opening doors, or just keys ? IMHO, that is another useless stuff, _shell_ mustn't have, and it does in debian (see curl). -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Bash /dev/tcp and /dev/udp
Hi Klaus, > >from the bash manpage: > /dev/tcp/host/port > /dev/udp/host/port This has been discussed several times [1][2], and the outcome was every time that this should not be a feature of the shell, but of more specialized tools like nc. Use those or recompile your bash. Regards, Jan [1] http://lists.debian.org/debian-user/2003/04/msg01591.html [2] http://lists.debian.org/debian-user/2006/07/msg00121.html signature.asc Description: Digital signature
Re: Bash /dev/tcp and /dev/udp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/23/06 07:09, Jan C. Nordholz wrote: > Hi Klaus, > >> >from the bash manpage: >> /dev/tcp/host/port >> /dev/udp/host/port > > This has been discussed several times [1][2], and the outcome was every time > that this should not be a feature of the shell, but of more specialized > tools like nc. Use those or recompile your bash. [snip] > > [1] http://lists.debian.org/debian-user/2003/04/msg01591.html > [2] http://lists.debian.org/debian-user/2006/07/msg00121.html http://lists.debian.org/debian-user/2006/07/msg00204.html It can produce completely unexpected results. C & Perl also can produce completely unexpected results, and C is a security nightmare, but we don't ban/disable them in Debian. What's the real problem with /dev/{tcp|udp}? - -- Ron Johnson, Jr. Jefferson LA USA Is "common sense" really valid? For example, it is "common sense" to white-power racists that whites are superior to blacks, and that those with brown skins are mud people. However, that "common sense" is obviously wrong. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFZcF6S9HxQb37XmcRAu75AJ9S5N5WsO3+E55j4tPT/ef26icYCwCZAa1e bhf8OxMiQisYxeAymSOMpv0= =ztqT -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Bash /dev/tcp and /dev/udp
Am Donnerstag 23 November 2006 16:42 schrieb Ron Johnson: > What's the real problem with /dev/{tcp|udp}? # ls /dev/udp /dev/tcp ls: /dev/udp: No such file or directory ls: /dev/tcp: No such file or directory The chosen method of integration is practical non-sense. What happens if /dev/tcp is present and a character device? Did anyone show an example that didn't have a much better solution than this bash hack? HS -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Bash /dev/tcp and /dev/udp
On Thu, 23 Nov 2006 09:42:50 -0600 Ron Johnson <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 11/23/06 07:09, Jan C. Nordholz wrote: > > Hi Klaus, > > > >> >from the bash manpage: > >> /dev/tcp/host/port > >> /dev/udp/host/port > > > > This has been discussed several times [1][2], and the outcome was every time > > that this should not be a feature of the shell, but of more specialized > > tools like nc. Use those or recompile your bash. > [snip] > > > > [1] http://lists.debian.org/debian-user/2003/04/msg01591.html > > [2] http://lists.debian.org/debian-user/2006/07/msg00121.html > > http://lists.debian.org/debian-user/2006/07/msg00204.html > > It can produce completely unexpected results. > > C & Perl also can produce completely unexpected results, and C is a > security nightmare, but we don't ban/disable them in Debian. FWIW, awk has similar functionality. From awk(1): The following special filenames may be used with the |& co-process operator for creating TCP/IP network connections. /inet/tcp/lport/rhost/rport File for TCP/IP connection on local port lport to remote host rhost on remote port rport. Use a port of 0 to have the system pick a port. /inet/udp/lport/rhost/rport Similar, but use UDP/IP instead of TCP/IP. /inet/raw/lport/rhost/rport Reserved for future use. grts Tim signature.asc Description: PGP signature
Re: Bash /dev/tcp and /dev/udp
On Thu, Nov 23, 2006 at 02:09:33PM +0100, Jan C. Nordholz wrote: > Hi Klaus, > > > >from the bash manpage: > > /dev/tcp/host/port > > /dev/udp/host/port > > This has been discussed several times [1][2], and the outcome was every time > that this should not be a feature of the shell, but of more specialized > tools like nc. Use those or recompile your bash. Then the manpage should be ammended and those things removed. It does not make sense to disable things and ship a manpage that implies that they do work. Regards Javier signature.asc Description: Digital signature
Re: Bash /dev/tcp and /dev/udp
On Thu, Nov 23, 2006 at 22:54:59 +0100, Javier Fernández-Sanguino Peña wrote: > Then the manpage should be ammended and those things removed. It does not > make sense to disable things and ship a manpage that implies that they do > work. > Did you look at the bash manpage? NOTE: Bash, as packaged for Debian, does not support using the /dev/tcp and /dev/udp files. Cheers, Julien -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Bash /dev/tcp and /dev/udp
Le Thu, Nov 23, 2006 at 02:09:33PM +0100, Jan C. Nordholz a écrit : > Hi Klaus, > > > >from the bash manpage: > > /dev/tcp/host/port > > /dev/udp/host/port > > This has been discussed several times [1][2], and the outcome was every time > that this should not be a feature of the shell, but of more specialized > tools like nc. Use those or recompile your bash. > > > Regards, > > Jan > > [1] http://lists.debian.org/debian-user/2003/04/msg01591.html > [2] http://lists.debian.org/debian-user/2006/07/msg00121.html Dear all, I found the following additional discussions in my crystal ball: http://lists.debian.org/debian-user/2008/09/msg00087.html http://lists.debian.org/debian-user/2010/02/msg00295.html Maybe one source of the problem is that the bug report contains only messages advocating the inclusion of the feature, and that the maintainer tagged it "wontfix" without explaining his reasons? Have a nice day, -- Charles Plessy http://charles.plessy.org Wako, Saitama, Japan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Bash /dev/tcp and /dev/udp
> "Charles" == Charles Plessy <[EMAIL PROTECTED]> writes: Charles> I found the following additional discussions in my Charles> crystal ball: Charles> http://lists.debian.org/debian-user/2008/09/msg00087.html Charles> http://lists.debian.org/debian-user/2010/02/msg00295.html Sure about these URLs? Or do we have to wait several years before the messages will get posted? ;-) -- Brian May <[EMAIL PROTECTED]> -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Bash /dev/tcp and /dev/udp
On Thu, Nov 23, 2006 at 11:02:15PM +0100, Julien Cristau wrote: > On Thu, Nov 23, 2006 at 22:54:59 +0100, Javier Fernández-Sanguino Peña wrote: > > > Then the manpage should be ammended and those things removed. It does not > > make sense to disable things and ship a manpage that implies that they do > > work. > > > Did you look at the bash manpage? > >NOTE: Bash, as packaged for Debian, does not support using the /dev/tcp >and /dev/udp files. Yes, but I missed that paragraph. Javier signature.asc Description: Digital signature
Re: Bash /dev/tcp and /dev/udp
On Thu, Nov 23, 2006 at 09:42:50AM -0600, Ron Johnson wrote: > What's the real problem with /dev/{tcp|udp}? My issue with it is having phantom files that only exist in one shell on the system, could clash with real files (although that is more or less totally unlikely). I think that having the shell re-implement netcat to be a violation of "do one thing and do it well". I've never came across a script on debian or elsewhere that required this functionality enabled. Indeed I'm horrified to find this feature enabled on RHEL boxes. -- Jon Dowland -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Bash /dev/tcp and /dev/udp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/24/06 06:06, Jon Dowland wrote: > On Thu, Nov 23, 2006 at 09:42:50AM -0600, Ron Johnson wrote: >> What's the real problem with /dev/{tcp|udp}? > > My issue with it is having phantom files that only exist in > one shell on the system, could clash with real files That's reasonable. > (although that is more or less totally unlikely). I think > that having the shell re-implement netcat to be a violation > of "do one thing and do it well". Hmmm. A large, complicated shell like bash broke that stricture long ago, no? >I've never came across a > script on debian or elsewhere that required this > functionality enabled. Indeed I'm horrified to find this > feature enabled on RHEL boxes. > > - -- Ron Johnson, Jr. Jefferson LA USA Is "common sense" really valid? For example, it is "common sense" to white-power racists that whites are superior to blacks, and that those with brown skins are mud people. However, that "common sense" is obviously wrong. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFZwDXS9HxQb37XmcRAsjaAKCokRp0iMJTpi7Vu05kv55c9ZnKJgCg7zLT Kb0U3+3Su3VAJniI1s+16ic= =2O8j -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Bash /dev/tcp and /dev/udp
On Fri, Nov 24, 2006 at 08:25:27AM -0600, Ron Johnson wrote: > On 11/24/06 06:06, Jon Dowland wrote: > > I think that having the shell re-implement netcat to be > > a violation of "do one thing and do it well". > > Hmmm. A large, complicated shell like bash broke that > stricture long ago, no? Absolutely: but that doesn't give it a free licence to continue doing so :) -- Jon Dowland -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Bash /dev/tcp and /dev/udp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/24/06 11:54, Jon Dowland wrote: > On Fri, Nov 24, 2006 at 08:25:27AM -0600, Ron Johnson wrote: >> On 11/24/06 06:06, Jon Dowland wrote: >>> I think that having the shell re-implement netcat to be >>> a violation of "do one thing and do it well". >> Hmmm. A large, complicated shell like bash broke that >> stricture long ago, no? > > Absolutely: but that doesn't give it a free licence to > continue doing so :) Sure it does. How long ago did Perl stop being just a Practical Extraction and Report Language? - -- Ron Johnson, Jr. Jefferson LA USA Is "common sense" really valid? For example, it is "common sense" to white-power racists that whites are superior to blacks, and that those with brown skins are mud people. However, that "common sense" is obviously wrong. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFZ0QiS9HxQb37XmcRAn/AAJ4ki19tIDELrqOz6DTpY3xwCLy0yACgid0E U39ZnWEF3on2RLeBlzMv/2U= =r3W9 -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Bash /dev/tcp and /dev/udp
On Fri, Nov 24, 2006 at 12:06:09PM +, Jon Dowland wrote: > I've never came across a script on debian or elsewhere that required > this functionality enabled. Indeed I'm horrified to find this feature > enabled on RHEL boxes. FWIW, ksh93 (as packaged in Debian) has this functionality enabled... it seems to be available by default in various *nix incarnations as well, such as Solaris 9 & 10. This doesn't make the feature a good idea, of course, but it does appear to be commonly available. A quick perusal of the zsh manpage seems to indicate that it can do this as well (albeit with quite different syntax), but I didn't take the time to verify. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Bash /dev/tcp and /dev/udp
On Fri, 2006-11-24 at 13:12 -0600, Ron Johnson wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 11/24/06 11:54, Jon Dowland wrote: > > On Fri, Nov 24, 2006 at 08:25:27AM -0600, Ron Johnson wrote: > >> On 11/24/06 06:06, Jon Dowland wrote: > >>> I think that having the shell re-implement netcat to be > >>> a violation of "do one thing and do it well". > >> Hmmm. A large, complicated shell like bash broke that > >> stricture long ago, no? > > > > Absolutely: but that doesn't give it a free licence to > > continue doing so :) > > Sure it does. How long ago did Perl stop being just a Practical > Extraction and Report Language? Ron, please stop that urban legend. Perl is Perl not P.E.R.L as you say. I have been corrected for saying that, by more than one Perl Monk, also by Mr. Wall. Perl is Perl. It has no meaning other than Perl. -- greg, [EMAIL PROTECTED] The technology that is Stronger, better, faster: Linux signature.asc Description: This is a digitally signed message part
Re: Bash /dev/tcp and /dev/udp
On Thu, Nov 23, 2006 at 05:03:13PM +0100, Hendrik Sattler wrote: # ls /dev/udp /dev/tcp ls: /dev/udp: No such file or directory ls: /dev/tcp: No such file or directory The chosen method of integration is practical non-sense. What happens if /dev/tcp is present and a character device? That's more likely than it might sound. A proper way to implement the /dev/tcp/ feature (if you're going to implement it at all) would be to use FUSE, and it wouldn't surprise me if someone did that within the next 5 years. -- Dwayne C. Litzenberger <[EMAIL PROTECTED]> -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug in Perl man page (was Re: Bash /dev/tcp and /dev/udp)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/25/06 00:46, Greg Folkert wrote: > On Fri, 2006-11-24 at 13:12 -0600, Ron Johnson wrote: >> >> On 11/24/06 11:54, Jon Dowland wrote: >>> On Fri, Nov 24, 2006 at 08:25:27AM -0600, Ron Johnson wrote: On 11/24/06 06:06, Jon Dowland wrote: [snip] > Ron, please stop that urban legend. Perl is Perl not P.E.R.L as you say. > > I have been corrected for saying that, by more than one Perl Monk, also > by Mr. Wall. > > Perl is Perl. It has no meaning other than Perl. I guess I'd better file a bug against the perl package then. PERL(1) Perl Programmers Reference Guide PERL(1) NAME perl - Practical Extraction and Report Language SYNOPSIS perl [ -sTtuUWX ] [ -hv ] [ -V[:configvar] ] [snip] perl v5.8.82006-08-06PERL(1) Manual page perl(1) line 377/430 (END) - -- Ron Johnson, Jr. Jefferson LA USA Is "common sense" really valid? For example, it is "common sense" to white-power racists that whites are superior to blacks, and that those with brown skins are mud people. However, that "common sense" is obviously wrong. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFaIL6S9HxQb37XmcRAjE/AKCuDDgtf545ym/uxYCDqQmI/2ys/ACcD6ee 6hF156yUXhsiSBMha1VEVZk= =3gG9 -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]