diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-07-21 10:34:21 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-07-21 10:34:21 +0200 |
commit | 41a8fb5810759118d93bee30a254ecf4863437b5 (patch) | |
tree | 81c960097719c1d81d5b9dc330908e4c9aa05962 /libssh/auth.c | |
parent | 8843d8b68d180dbc3b0edbfb47ded3fadbe86988 (diff) | |
download | libssh-41a8fb5810759118d93bee30a254ecf4863437b5.tar.gz libssh-41a8fb5810759118d93bee30a254ecf4863437b5.tar.xz libssh-41a8fb5810759118d93bee30a254ecf4863437b5.zip |
Make the ssh_userauth_kbdint functions to get the prompts const.
They shouldn't be modified or free'd by a user.
Diffstat (limited to 'libssh/auth.c')
-rw-r--r-- | libssh/auth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libssh/auth.c b/libssh/auth.c index 752341d..aadba0b 100644 --- a/libssh/auth.c +++ b/libssh/auth.c @@ -1417,7 +1417,7 @@ int ssh_userauth_kbdint_getnprompts(SSH_SESSION *session) { * * @returns The name of the message block. Do not free it. */ -char *ssh_userauth_kbdint_getname(SSH_SESSION *session) { +const char *ssh_userauth_kbdint_getname(SSH_SESSION *session) { return session->kbdint->name; } @@ -1432,7 +1432,7 @@ char *ssh_userauth_kbdint_getname(SSH_SESSION *session) { * @returns The instruction of the message block. */ -char *ssh_userauth_kbdint_getinstruction(SSH_SESSION *session) { +const char *ssh_userauth_kbdint_getinstruction(SSH_SESSION *session) { return session->kbdint->instruction; } @@ -1452,7 +1452,7 @@ char *ssh_userauth_kbdint_getinstruction(SSH_SESSION *session) { * * @returns A pointer to the prompt. Do not free it. */ -char *ssh_userauth_kbdint_getprompt(SSH_SESSION *session, unsigned int i, +const char *ssh_userauth_kbdint_getprompt(SSH_SESSION *session, unsigned int i, char *echo) { if (i > session->kbdint->nprompts) { return NULL; |