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

Wrong EOF error handling in sshd agent

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.13.0
    • None

    Description

      In sshd-core/src/main/java/org/apache/sshd/agent/unix/AgentServer.java, method SshAgentSession:run(), there is a check for end of file return code (result == Status.APR_EOF). However tomcat native returns codes negative, so the condition never matches.
      It needs to be changed to (result == -Status.APR_EOF).
      (For an example see e.g. tomcat-native-1.1.31-src\jni\java\org\apache\tomcat\jni\socket\AprSocket.java, processReadResult method: if (read == -Status.APR_EOF || read == -1)).
      Other places where tomcat jni return codes are used should be checked, I expect the same problem there as well.

      Attachments

        Activity

          People

            gnodet Guillaume Nodet
            kicker Tomas Kopal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: