[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible error in Docs on Authentication



On 19/05/2017 07:52, Andreas Schneider wrote:
On Wednesday, 17 May 2017 22:29:09 CEST Jason Curl wrote:
Hi,

I've noticed a very small detail on this page:

http://api.libssh.org/master/libssh_tutor_authentication.html

int test_several_auth_methods(ssh_session session)
{
   int method, rc;
   rc = ssh_userauth_none(session, NULL);
   if (rc != SSH_AUTH_SUCCESS) {
       return rc;
   }

I believe it should be:
If (rc == SSH_AUTH_SUCCESS) {
   return rc;
}
I think it should be:

if (rc == SSH_AUTH_SUCCESS || rc == SSH_AUTH_ERROR) {
      return rc;
}

Do you agree? :-)
Just learned that SSH_AUTH_ERROR occurs when the remote connection closes and remains that way, so yes.
References:
Possible error in Docs on AuthenticationJason Curl <jason@xxxxxxxxxxxxxxxxxxxxxxxx>
Re: Possible error in Docs on AuthenticationAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org