Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
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.