frothga opened a new pull request, #353:
URL: https://github.com/apache/mina-sshd/pull/353

   This change tries to bring config file processing more in line with the 
semantics indicated in the ssh man page. The most significant changes are that 
each attribute is drawn from the first matching entry in file order. There are 
also defaults supplied that are in line with the behavior of the ssh command 
line tool. In particular, the local user name is used for any host where none 
is specified, and port 22 is used whenever port is not specified. Even though 
one might imagine these obvious defaults were in effect before, there were 
paths through the code where they did not get set.
   
   This change modifies some of the test cases:
   testResolvePort, testResolveUsername -- Removed because these functions no 
longer exist.
   testFindBestMatch -- Removed because that's not how config files are 
supposed to be handled.
   testConfigFileReload -- Original test was based on the incorrect notion that 
a latter entry in config could override an earlier one. I moved the catch-all 
entry to the end to approximate the correct semantics. Note that there may be 
relevant test cases where the global attributes are involved, but this 
particular test doesn't fit in that category.
   testReadGlobalHostsConfigEntries -- Original test was written with the 
assumption that entries are collated at the time they are read from file. In 
the new approach, they are collated on demand. (This is necessary because only 
when a host query is made do we know which entries apply.) The test is 
rewritten to verify that entries have only the attributes specified in the 
file. The new version of the test is somewhat pointless, but it seemed better 
than deleting altogether.
   
   Note that testNegatedHostEntriesResolution is failing on my system. Debug 
tracing shows that it is doing the right thing (not using the negated entry). I 
believe the problem is due to corporate firewall configuration.
   
   The HostConfigEntry class could be further improved by storing everything in 
the properties collection and funneling all the accessors to it, rather than 
having separate class members for special properties like port and username. 
This may be the subject of a future PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to