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

Possible error in Docs on Authentication


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;
}

Otherwise the code would normally always report an error, because it's
expected in 99% of securely configured devices that it would be
SSH_AUTH_DENIED.

Let me know if I misunderstood.

Regards,
Jason.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Follow-Ups:
Re: Possible error in Docs on AuthenticationAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org