Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-146

SSH Server : EOF from command not propagating to Process (InvertedShell)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.6.0, 0.7.0
    • 0.7.0
    • None

    Description

      This issue is related to SSHD-35.
      The change implemented in that issue causes the EOF to be propagated to the shell, but because the inverted shell has to pump between the SSH streams and the Process streams, the EOF never makes it to the OS process.

      The cause is that ChannelSession.handleEof() calls shellIn.close(), but shellIn is not directly attached to the process. In fact it's InvertedShellWrapper.pumpStream() that copies from the shellIn to the process, and that doesn't handle EOF.

      I can't see a obvious fix.
      I've put a bit of a hack in that does what I need (and proves that this problem is as described), but it really is a hack...

      Attachments

        1. sshd-eof.patch
          1 kB
          Tim Vernum
        2. SSH-146.patch
          5 kB
          Pierre-Etienne Poirot

        Activity

          People

            gnodet Guillaume Nodet
            tvernum Tim Vernum
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: