From 90a6d431a75e9bcec68cd2e7c1a42465238d3faf Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 21 Jul 2009 10:34:21 +0200 Subject: Make the ssh_userauth_kbdint functions to get the prompts const. They shouldn't be modified or free'd by a user. --- libssh/auth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libssh') diff --git a/libssh/auth.c b/libssh/auth.c index 752341dd..aadba0ba 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; -- cgit v1.2.3