diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-14 00:51:08 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-14 00:51:08 +0200 |
commit | b23b3f1d9951df3ea7cc074de40db04bdf0d3a1c (patch) | |
tree | d4fe8f4c4aa71c6cebe7d1d92dc25ea145d98cd1 /libssh/auth1.c | |
parent | 46b249f5ce552bba2e0a170cb0b8052b1419924b (diff) | |
download | libssh-b23b3f1d9951df3ea7cc074de40db04bdf0d3a1c.tar.gz libssh-b23b3f1d9951df3ea7cc074de40db04bdf0d3a1c.tar.xz libssh-b23b3f1d9951df3ea7cc074de40db04bdf0d3a1c.zip |
Sanitize libssh namespace + legacy wrappers
Diffstat (limited to 'libssh/auth1.c')
-rw-r--r-- | libssh/auth1.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libssh/auth1.c b/libssh/auth1.c index 4154728d..100e0c8b 100644 --- a/libssh/auth1.c +++ b/libssh/auth1.c @@ -86,20 +86,20 @@ static int send_username(ssh_session session, const char *username) { } } } - user = string_from_char(username); + user = ssh_string_from_char(username); if (user == NULL) { return SSH_AUTH_ERROR; } if (buffer_add_u8(session->out_buffer, SSH_CMSG_USER) < 0) { - string_free(user); + ssh_string_free(user); return SSH_AUTH_ERROR; } if (buffer_add_ssh_string(session->out_buffer, user) < 0) { - string_free(user); + ssh_string_free(user); return SSH_AUTH_ERROR; } - string_free(user); + ssh_string_free(user); session->auth_state=SSH_AUTH_STATE_NONE; if (packet_send(session) != SSH_OK) { return SSH_AUTH_ERROR; @@ -156,7 +156,7 @@ int ssh_userauth1_password(ssh_session session, const char *username, /* cisco IOS doesn't like when a password is followed by zeroes and random pad. */ if(1 || strlen(password) >= 128) { /* not risky to disclose the size of such a big password .. */ - pwd = string_from_char(password); + pwd = ssh_string_from_char(password); if (pwd == NULL) { leave_function(); return SSH_AUTH_ERROR; @@ -168,7 +168,7 @@ int ssh_userauth1_password(ssh_session session, const char *username, * why garbage ? because nul bytes will be compressed by * gzip and disclose password len. */ - pwd = string_new(128); + pwd = ssh_string_new(128); if (pwd == NULL) { leave_function(); return SSH_AUTH_ERROR; @@ -178,20 +178,20 @@ int ssh_userauth1_password(ssh_session session, const char *username, } if (buffer_add_u8(session->out_buffer, SSH_CMSG_AUTH_PASSWORD) < 0) { - string_burn(pwd); - string_free(pwd); + ssh_string_burn(pwd); + ssh_string_free(pwd); leave_function(); return SSH_AUTH_ERROR; } if (buffer_add_ssh_string(session->out_buffer, pwd) < 0) { - string_burn(pwd); - string_free(pwd); + ssh_string_burn(pwd); + ssh_string_free(pwd); leave_function(); return SSH_AUTH_ERROR; } - string_burn(pwd); - string_free(pwd); + ssh_string_burn(pwd); + ssh_string_free(pwd); session->auth_state=SSH_AUTH_STATE_NONE; if (packet_send(session) != SSH_OK) { leave_function(); |