summaryrefslogtreecommitdiffstats
path: root/libssh/auth1.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/auth1.c')
-rw-r--r--libssh/auth1.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libssh/auth1.c b/libssh/auth1.c
index ec73905c..d4abc54e 100644
--- a/libssh/auth1.c
+++ b/libssh/auth1.c
@@ -51,7 +51,7 @@ static int wait_auth1_status(SSH_SESSION *session){
"FAILURE, got %d",session->in_packet.type);
return SSH_AUTH_ERROR;
}
-static int send_username(SSH_SESSION *session, char *username){
+static int send_username(SSH_SESSION *session, const char *username){
STRING *user;
/* returns SSH_AUTH_SUCCESS or SSH_AUTH_DENIED */
if(session->auth_service_asked)
@@ -74,7 +74,7 @@ static int send_username(SSH_SESSION *session, char *username){
/* use the "none" authentication question */
-int ssh_userauth1_none(SSH_SESSION *session,char *username){
+int ssh_userauth1_none(SSH_SESSION *session,const char *username){
return send_username(session,username);
}
@@ -119,7 +119,7 @@ int ssh_userauth_offer_pubkey(SSH_SESSION *session, char *username,int type, STR
/** \internal
* \todo implement ssh1 public key
*/
-int ssh_userauth1_offer_pubkey(SSH_SESSION *session, char *username, int type,
+int ssh_userauth1_offer_pubkey(SSH_SESSION *session, const char *username, int type,
STRING *pubkey){
return SSH_AUTH_DENIED;
}
@@ -171,7 +171,7 @@ int ssh_userauth_pubkey(SSH_SESSION *session, char *username, STRING *publickey,
}
*/
-int ssh_userauth1_password(SSH_SESSION *session,char *username,char *password){
+int ssh_userauth1_password(SSH_SESSION *session,const char *username,const char *password){
STRING *password_s;
int err;
err=send_username(session,username);
@@ -183,7 +183,7 @@ int ssh_userauth1_password(SSH_SESSION *session,char *username,char *password){
*/
/* XXX fix me here ! */
/* cisco IOS doesn't like when a password is followed by zeroes and random pad. */
- if(strlen(password)>=0){
+ if(1 || strlen(password)>=128){
/* not risky to disclose the size of such a big password .. */
password_s=string_from_char(password);
} else {
n145' href='#n145'>145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196