From 67de62d650f8b6096bab17e8cfcec461fad9d97b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 26 Apr 2010 22:28:36 +0200 Subject: [PATCH] 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. --- docs/libssh2_userauth_password_ex.3 | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/libssh2_userauth_password_ex.3 b/docs/libssh2_userauth_password_ex.3 index a18d3c47..706424eb 100644 --- a/docs/libssh2_userauth_password_ex.3 +++ b/docs/libssh2_userauth_password_ex.3 @@ -5,13 +5,18 @@ libssh2_userauth_password_ex - authenticate a session with username and password .SH SYNOPSIS #include +.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 -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 -libssh2_userauth_password(LIBSSH2_SESSION *session, const char *username, const char *password); - +#define libssh2_userauth_password(session, username, password) \\ + libssh2_userauth_password_ex((session), (username), \\ + strlen(username), \\ + (password), strlen(password), NULL) .SH DESCRIPTION \fIsession\fP - Session instance as returned by .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. .SH ERRORS +Some of the errors this function may return include: + \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. \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 .BR libssh2_session_init_ex(3)