On Nov 17, 2009, at 5:59 AM, Dave McCaldon wrote: >> >> LOGIN_FAILED is very generic. The userauth_publickey function uses >> a very specific PUBLICKEY_UNVERIFIED return code for the same SSH >> layer error. I think that either the now suggested LOGIN_FAILED >> should be renamed to PASSWORD_NOT_ACCEPTED or similar, or both of >> these error branches should just return one and the same >> LIBSSH2_ERROR_ to the application - after all it is the same error >> code in the SSH protocol, and the application knows which function >> it just called. I don't see a big benefit with dividing the error >> code inside libssh2? > > I chose LIBSSH2_ERROR_LOGIN_FAILED for two reasons: > > 1) As you point out, userath_publickey already returns a fairly > specific error > 2) The login failure could be caused by either a bad password, and/or > invalid username > > I can resubmit the patch introducing LIBSSH2_ERROR_AUTHORIZATION_FAILED as an > alias for LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED (-19) and have both functions > now return this value (preserving backward compatibility with current code), > although this presumably would alter the description for -19 to > "Authorization failed".
Before I re-submit a patch for this, I wanted to make sure that there were no objections to the error codes or names. Thanks!
_______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
