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

NPE while executing a command while redirecting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 1.1.0
    • None
    • java version "1.7.0_85"
      OpenJDK Runtime Environment (IcedTea 2.6.1) (Gentoo icedtea-7.2.6.1-r1)
      OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)

    Description

      Try to execute:

      $ echo xxxx | ssh -p @PORT@ root@localhost "cat > /none/exist/path/file"

      You should get the following exception in 9:10 attempts:

      Exception in thread "sshd-shell[855da06]-thread-1" java.lang.NullPointerException
      at org.apache.sshd.server.shell.ProcessShellFactory$ProcessShell.exitValue(ProcessShellFactory.java:170)
      at org.apache.sshd.server.shell.InvertedShellWrapper.pumpStreams(InvertedShellWrapper.java:165)
      at org.apache.sshd.server.shell.InvertedShellWrapper$1.run(InvertedShellWrapper.java:125)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

      I cannot understand how process can be null in this context.

      Attachments

        1. SSHD.java
          4 kB
          Alon Bar-Lev

        Activity

          People

            lgoldstein Lyor Goldstein
            alonbl Alon Bar-Lev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: