Improve ssh_userauth_kbdint_getprompt.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@645 7dcaeef0-15fb-0310-b436-a5af3365683c
Этот коммит содержится в:
родитель
5fdcd4df7b
Коммит
3024e3652f
@ -1366,23 +1366,33 @@ char *ssh_userauth_kbdint_getinstruction(SSH_SESSION *session) {
|
|||||||
return session->kbdint->instruction;
|
return session->kbdint->instruction;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** You have called ssh_userauth_kbdint() and got SSH_AUTH_INFO. this
|
/**
|
||||||
* function returns the questions from the server
|
* @brief Get a prompt from a message block.
|
||||||
* \brief get a prompt from a message block
|
*
|
||||||
* \param session ssh session
|
* You have called ssh_userauth_kbdint() and got SSH_AUTH_INFO. This
|
||||||
* \param i index number of the ith prompt
|
* function returns the questions from the server.
|
||||||
* \param echo when different of NULL, it will obtain a boolean meaning that the
|
*
|
||||||
* resulting user input should be echoed or not (like passwords)
|
* @param session The ssh session to use.
|
||||||
* \returns pointer to the prompt. Do not free it
|
*
|
||||||
|
* @param i The inndex number of the i'th prompt.
|
||||||
|
*
|
||||||
|
* @param echo When different of NULL, it will obtain a boolean meaning
|
||||||
|
* that the resulting user input should be echoed or not
|
||||||
|
* (like passwords).
|
||||||
|
*
|
||||||
|
* @returns A pointer to the prompt. Do not free it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *ssh_userauth_kbdint_getprompt(SSH_SESSION *session, unsigned int i,
|
char *ssh_userauth_kbdint_getprompt(SSH_SESSION *session, unsigned int i,
|
||||||
char *echo){
|
char *echo) {
|
||||||
if(i > session->kbdint->nprompts)
|
if (i > session->kbdint->nprompts) {
|
||||||
return NULL;
|
return NULL;
|
||||||
if(echo)
|
}
|
||||||
*echo=session->kbdint->echo[i];
|
|
||||||
return session->kbdint->prompts[i];
|
if (echo) {
|
||||||
|
*echo = session->kbdint->echo[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return session->kbdint->prompts[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** You have called ssh_userauth_kbdint() and got SSH_AUTH_INFO. this
|
/** You have called ssh_userauth_kbdint() and got SSH_AUTH_INFO. this
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user