summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-01-17 11:10:48 +1100
committerDamien Miller <djm@mindrot.org>2001-01-17 11:10:48 +1100
commit92e78f8c6424f0d466e1df673228870ef009105b (patch)
tree1809206c2385b1a49b459a80dba363a352effaa2
parenta64b57a157068c793ac7be2ad276b208a7d10a90 (diff)
downloadopenssh-git-92e78f8c6424f0d466e1df673228870ef009105b.tar.gz
- (djm) Avoid warning in PAM code by making read_passphrase arguments const
-rw-r--r--ChangeLog1
-rw-r--r--cli.c4
-rw-r--r--cli.h3
-rw-r--r--readpass.c2
-rw-r--r--ssh.h2
5 files changed, 7 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 18cc5ebf..49014534 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
- (djm) Avoid a warning in bsd-bindresvport.c
- (djm) Try to avoid adding -I/usr/include to CPPFLAGS during SSL tests. This
can cause weird segfaults errors on Solaris
+ - (djm) Avoid warning in PAM code by making read_passphrase arguments const
20010115
- (bal) sftp-server.c change to use chmod() if fchmod() does not exist.
diff --git a/cli.c b/cli.c
index f5c6728c..931107f2 100644
--- a/cli.c
+++ b/cli.c
@@ -129,7 +129,7 @@ cli_read(char* buf, int size, int echo)
}
static int
-cli_write(char* buf, int size)
+cli_write(const char* buf, int size)
{
int i, len, pos, ret = 0;
char *output, *p;
@@ -161,7 +161,7 @@ cli_write(char* buf, int size)
* buffer is storing the response.
*/
char*
-cli_read_passphrase(char* prompt, int from_stdin, int echo_enable)
+cli_read_passphrase(const char* prompt, int from_stdin, int echo_enable)
{
char buf[BUFSIZ];
char* p;
diff --git a/cli.h b/cli.h
index c4194046..fbcc8796 100644
--- a/cli.h
+++ b/cli.h
@@ -9,7 +9,8 @@
* of response depending on arg. Tries to ensure that no other userland
* buffer is storing the response.
*/
-char* cli_read_passphrase(char* prompt, int from_stdin, int echo_enable);
+char* cli_read_passphrase(const char* prompt, int from_stdin,
+ int echo_enable);
char* cli_prompt(char* prompt, int echo_enable);
void cli_mesg(char* mesg);
diff --git a/readpass.c b/readpass.c
index f3a7dcbe..64281edd 100644
--- a/readpass.c
+++ b/readpass.c
@@ -49,7 +49,7 @@ RCSID("$OpenBSD: readpass.c,v 1.12 2000/10/11 20:14:39 markus Exp $");
* compatibility with existing code.
*/
char *
-read_passphrase(char *prompt, int from_stdin)
+read_passphrase(const char *prompt, int from_stdin)
{
return cli_read_passphrase(prompt, from_stdin, 0);
}
diff --git a/ssh.h b/ssh.h
index 27575c29..f7330b91 100644
--- a/ssh.h
+++ b/ssh.h
@@ -418,7 +418,7 @@ int auth_rsa_challenge_dialog(RSA *pk);
* passphrase (allocated with xmalloc). Exits if EOF is encountered. If
* from_stdin is true, the passphrase will be read from stdin instead.
*/
-char *read_passphrase(char *prompt, int from_stdin);
+char *read_passphrase(const char *prompt, int from_stdin);
/*------------ Definitions for logging. -----------------------*/