FAQ
+cc agl,

I'm happy with the code, but I have no experience with this
authentication method, so I'll defer to agl on this aspect.


https://codereview.appspot.com/9853050/diff/7001/ssh/client_auth.go
File ssh/client_auth.go (right):

https://codereview.appspot.com/9853050/diff/7001/ssh/client_auth.go#newcode383
ssh/client_auth.go:383: questions []string, echos []bool) (answers
[]string, err error)
please don't wrap, if the line is too long, drop the names on the return
args.

https://codereview.appspot.com/9853050/diff/7001/ssh/client_auth.go#newcode429
ssh/client_auth.go:429: msg := decode(packet).(*userAuthFailureMsg)
please add a type assertion here, and return an error in the unlikely
case.

https://codereview.appspot.com/9853050/diff/7001/ssh/client_auth.go#newcode437
ssh/client_auth.go:437: msg := new(userAuthInfoRequestMsg)
var msg userAuthInfoRequestMsg

https://codereview.appspot.com/9853050/diff/7001/ssh/client_auth.go#newcode438
ssh/client_auth.go:438: if err := unmarshal(msg, packet, packet[0]); err
!= nil {
unmarshal(&msg, ...)

https://codereview.appspot.com/9853050/diff/7001/ssh/client_auth.go#newcode449
ssh/client_auth.go:449: return false, nil, errors.New("prompt format
error")
I'm not sure what the tradition here is, I think people are leaning
towards adding ssh: prefixes to error messages.

https://codereview.appspot.com/9853050/diff/7001/ssh/client_auth_test.go
File ssh/client_auth_test.go (right):

https://codereview.appspot.com/9853050/diff/7001/ssh/client_auth_test.go#newcode118
ssh/client_auth_test.go:118: questions []string, echos []bool) (answers
[]string, err error) {
same as previous file. As you are not using a naked return, I don't
think the named return args are adding much value here.

https://codereview.appspot.com/9853050/diff/7001/ssh/client_auth_test.go#newcode150
ssh/client_auth_test.go:150: client.Challenge("user", "thank you for
your cooperation", nil, nil)
Is this a standard response message ?

https://codereview.appspot.com/9853050/diff/7001/ssh/common.go
File ssh/common.go (right):

https://codereview.appspot.com/9853050/diff/7001/ssh/common.go#newcode332
ssh/common.go:332: func appendString(buf []byte, s string) []byte {
OT: all these append helpers need a cleanup.

https://codereview.appspot.com/9853050/diff/7001/ssh/messages.go
File ssh/messages.go (right):

https://codereview.appspot.com/9853050/diff/7001/ssh/messages.go#newcode37
ssh/messages.go:37: // Method specific messages:
this is a good comment, s/://

Maybe add some more comments for the other groups

https://codereview.appspot.com/9853050/diff/7001/ssh/server.go
File ssh/server.go (right):

https://codereview.appspot.com/9853050/diff/7001/ssh/server.go#newcode46
ssh/server.go:46: // keyboard-interactive authentication is selected.
The
please add a (RFC XXXX) which describes keyboard-interactive

https://codereview.appspot.com/9853050/diff/7001/ssh/server.go#newcode47
ssh/server.go:47: // passed-in client can be used to talk to the user.
The
s/passed-in client/function/

https://codereview.appspot.com/9853050/diff/7001/ssh/server.go#newcode548
ssh/server.go:548: return nil, errors.New("echos and questions must have
equal length")
please add an 'ssh: ' prefix

https://codereview.appspot.com/9853050/diff/7001/ssh/server.go#newcode591
ssh/server.go:591: return nil, errors.New("junk at end of message")
same

https://codereview.appspot.com/9853050/

--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedJun 6, '13 at 12:04p
activeJun 6, '13 at 3:47p
posts6
users3
websitegolang.org

3 users in discussion

Hanwen: 3 posts Agl: 2 posts Dave: 1 post

People

Translate

site design / logo © 2021 Grokbase