1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-29 13:01:14 +03:00

libssh2_userauth_password_ex: clarify errors somewhat

The errors mentioned in this man page are possible return codes
but not necessarily the only return codes that this can return.

Also reformatted the typ prototypes somewhat.
This commit is contained in:
Daniel Stenberg
2010-04-26 22:28:36 +02:00
parent cb42be1a9c
commit 67de62d650

View File

@ -5,13 +5,18 @@
libssh2_userauth_password_ex - authenticate a session with username and password libssh2_userauth_password_ex - authenticate a session with username and password
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
.nf
int libssh2_userauth_password_ex(LIBSSH2_SESSION *session,
const char *username,
unsigned int username_len,
const char *password,
unsigned int password_len,
LIBSSH2_PASSWD_CHANGEREQ_FUNC((*passwd_change_cb)));
int #define libssh2_userauth_password(session, username, password) \\
libssh2_userauth_password_ex(LIBSSH2_SESSION *session, const char *username, unsigned int username_len, const char *password, unsigned int password_len, LIBSSH2_PASSWD_CHANGEREQ_FUNC((*passwd_change_cb))); libssh2_userauth_password_ex((session), (username), \\
strlen(username), \\
int (password), strlen(password), NULL)
libssh2_userauth_password(LIBSSH2_SESSION *session, const char *username, const char *password);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
@ -40,13 +45,15 @@ LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
.SH ERRORS .SH ERRORS
Some of the errors this function may return include:
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_PASSWORD_EXPIRED\fP - \fILIBSSH2_ERROR_PASSWORD_EXPIRED\fP -
\fLIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - failed, invalid username/password or public/private key. \fLIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - failed, invalid username/password
or public/private key.
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)