Re: Busybox httpd sends output of stderr to the Website

2017-03-26 Thread Laurent Bercot
https://www.freebsd.org/cgi/man.cgi?query=inetd "Theserver program isinvokedwith the service socket as its standardinput, output and error descriptors" Show me an implementation of inetd which does not do this. Oh, I'm not pretending wikipedia is wrong. I was just

Re: Busybox httpd sends output of stderr to the Website

2017-03-26 Thread Denys Vlasenko
On Sat, Mar 25, 2017 at 9:04 AM, Laurent Bercot wrote: >> Unless they do want _remote user_ to see the message. >> >> For example, if you start a shell over a tcp connection >> ("poor man's telnet"), you do want to see shell error messages >> when you work in that shell,

Re: Busybox httpd sends output of stderr to the Website

2017-03-25 Thread Laurent Bercot
Unless they do want _remote user_ to see the message. For example, if you start a shell over a tcp connection ("poor man's telnet"), you do want to see shell error messages when you work in that shell, right? IOW: inetd can't know which behavior is desirable, since both make sense. So the

Re: Busybox httpd sends output of stderr to the Website

2017-03-24 Thread Denys Vlasenko
On Thu, Mar 23, 2017 at 11:45 AM, Steve Bennett wrote: > >> On 23 Mar 2017, at 5:51 PM, Dirk Lohse wrote: >> >> A workaround for me is to not use inetd mode. But the reason for this >> behavior should be found and fixed - I think. >> >> Dirk >> > >

Re: Busybox httpd sends output of stderr to the Website

2017-03-23 Thread Laurent Bercot
inetd is tying stdout and stderr together. Personally I think this is wrong since it generally means that inetd services must be careful never to write to stderr. Use tcpserver instead of inetd. It allows you to use the "inetd mode" in applets, and does not exhibit the problems that inetd

Re: AW: Busybox httpd sends output of stderr to the Website

2017-03-23 Thread Peter Faasse
t; > > > it works like expected. A nice feature I found is starting with "-f" > > Don't daemonize and I can see the output from stderr on cmdline. This > > makes debugging quite easier :) > > > > > > > > Dirk > > > > > > > >

Re: Busybox httpd sends output of stderr to the Website

2017-03-23 Thread Steve Bennett
> On 23 Mar 2017, at 5:51 PM, Dirk Lohse wrote: > > A workaround for me is to not use inetd mode. But the reason for this > behavior should be found and fixed - I think. > > Dirk > See networking/inetd.c: /* manpages of inetd I managed to find either say

AW: Busybox httpd sends output of stderr to the Website

2017-03-23 Thread Dirk Lohse
@busybox.net Betreff: Re: Busybox httpd sends output of stderr to the Website Not sure why that happens (I mean stderr behaviour being different when httpd is started via inetd) but at least now you have solved your issue. Guillermo 2017-03-22 15:03 GMT+01:00 Dirk Lohse <d.lo...@meier-nt.de>

Re: Busybox httpd sends output of stderr to the Website

2017-03-22 Thread Guillermo Rodriguez Garcia
> Von: Guillermo Rodriguez Garcia [mailto:guille.rodrig...@gmail.com] > Gesendet: Dienstag, 21. März 2017 18:13 > An: Dirk Lohse > Cc: busybox@busybox.net > Betreff: Re: Busybox httpd sends output of stderr to the Website > > Looking at the source code of httpd.c from bu

AW: Busybox httpd sends output of stderr to the Website

2017-03-22 Thread Dirk Lohse
Rodriguez Garcia [mailto:guille.rodrig...@gmail.com] Gesendet: Dienstag, 21. März 2017 18:13 An: Dirk Lohse Cc: busybox@busybox.net Betreff: Re: Busybox httpd sends output of stderr to the Website Looking at the source code of httpd.c from busybox 1.20.2 I see this (send_cgi_and_exit, line 1408

AW: Busybox httpd sends output of stderr to the Website

2017-03-22 Thread Dirk Lohse
@busybox.net Betreff: Re: Busybox httpd sends output of stderr to the Website Looking at the source code of httpd.c from busybox 1.20.2 I see this (send_cgi_and_exit, line 1408) /* User seeing stderr output can be a security problem. * If CGI really wants that, it can always do dup itself. */ /* dup2(1

Re: Busybox httpd sends output of stderr to the Website

2017-03-21 Thread Bob Dunlop
> My question: How can I tell the httpd to NOT redirect stdout to the website? Or you could tell your CGI programs not to generate data on stderr. In your example for instance. #!/bin/sh # Redirect stderr, not required in production exec 2>/dev/null echo "Content-Type: text/plain"

Re: Busybox httpd sends output of stderr to the Website

2017-03-21 Thread Guillermo Rodriguez Garcia
Looking at the source code of httpd.c from busybox 1.20.2 I see this (send_cgi_and_exit, line 1408) /* User seeing stderr output can be a security problem. * If CGI really wants that, it can always do dup itself. */ /* dup2(1, 2); */ So it looks like it should be doing the right thing already