On Thu, Apr 08, 2021 at 02:48:59PM +0200, Thorsten Glaser <t.glaser at tarent.de> wrote:> On Thu, 8 Apr 2021, Bert Wesarg wrote: > > > see > > https://bugzilla.mindrot.org/show_bug.cgi?id=1902 > > for one of the first reports and also a reason why it is currently not accepted. > > This seems really wrong. #1902 refers to #1988 as reason for not > chdir?ing to / but #1988 is about (1, 0) vs. (1, 1) whereas #1902 > is about (0, 1) vs. (1, 1) so perhaps changing the daemon call to > (0, 0) will fix both? > > bye, > //mirabilos, not (yet) having looked at that code, just wonderingAh, #1988 is the reason. I would think that if that problem was that stderr is left open, the solution is to close stderr (when not debugging), rather than to not chdir /. cheers, raf
On Fri, Apr 09, 2021 at 01:41:47PM +1000, raf <ssh at raf.org> wrote:> On Thu, Apr 08, 2021 at 02:48:59PM +0200, Thorsten Glaser <t.glaser at tarent.de> wrote: > > > On Thu, 8 Apr 2021, Bert Wesarg wrote: > > > > > see > > > https://bugzilla.mindrot.org/show_bug.cgi?id=1902 > > > for one of the first reports and also a reason why it is currently not accepted. > > > > This seems really wrong. #1902 refers to #1988 as reason for not > > chdir?ing to / but #1988 is about (1, 0) vs. (1, 1) whereas #1902 > > is about (0, 1) vs. (1, 1) so perhaps changing the daemon call to > > (0, 0) will fix both? > > > > bye, > > //mirabilos, not (yet) having looked at that code, just wondering > > Ah, #1988 is the reason. I would think that if that problem > was that stderr is left open, the solution is to close stderr > (when not debugging), rather than to not chdir /. > > cheers, > rafThe current code has daemon(1, 1) in control_persist_detach(). The stderr problem is handled separately. So I think it needs to be changed to daemon(0, 1). I've created a new pull request to do it that way: https://github.com/openssh/openssh-portable/pull/243 cheers, raf
Just like stdout, stderr is essential for programs that the user runs on the remote machine.? Please don't close it unless and until the user does (e.g. ssh remote 'exec command 2>&-') -------- Forwarded Message -------- Subject: Re: ControlMaster cwd is not / Date: Fri, 9 Apr 2021 13:41:47 +1000 From: raf <ssh at raf.org> To: Thorsten Glaser <t.glaser at tarent.de> CC: Bert Wesarg <bert.wesarg at googlemail.com>, openssh-unix-dev at mindrot.org On Thu, Apr 08, 2021 at 02:48:59PM +0200, Thorsten Glaser <t.glaser at tarent.de> wrote:> On Thu, 8 Apr 2021, Bert Wesarg wrote: > > > see > > https://bugzilla.mindrot.org/show_bug.cgi?id=1902 > > for one of the first reports and also a reason why it is currently > not accepted. > > This seems really wrong. #1902 refers to #1988 as reason for not > chdir?ing to / but #1988 is about (1, 0) vs. (1, 1) whereas #1902 > is about (0, 1) vs. (1, 1) so perhaps changing the daemon call to > (0, 0) will fix both? > > bye, > //mirabilos, not (yet) having looked at that code, just wonderingAh, #1988 is the reason. I would think that if that problem was that stderr is left open, the solution is to close stderr (when not debugging), rather than to not chdir /. cheers, raf _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev at mindrot.org https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev