Tomas Kopal created SSHD-335:
--------------------------------
Summary: Wrong EOF error handling in sshd agent
Key: SSHD-335
URL: https://issues.apache.org/jira/browse/SSHD-335
Project: MINA SSHD
Issue Type: Bug
Reporter: Tomas Kopal
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.
--
This message was sent by Atlassian JIRA
(v6.2#6252)