summaryrefslogtreecommitdiff
path: root/svr-auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'svr-auth.c')
-rw-r--r--svr-auth.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/svr-auth.c b/svr-auth.c
index b8f0119..8666108 100644
--- a/svr-auth.c
+++ b/svr-auth.c
@@ -88,8 +88,7 @@ void send_msg_userauth_banner(buffer *banner) {
CHECKCLEARTOWRITE();
buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_BANNER);
- buf_putstring(ses.writepayload, buf_getptr(banner, banner->len),
- banner->len);
+ buf_putbufstring(ses.writepayload, banner);
buf_putstring(ses.writepayload, "en", 2);
encrypt_packet();
@@ -344,12 +343,10 @@ void send_msg_userauth_failure(int partial, int incrfail) {
buf_putbytes(typebuf, AUTH_METHOD_PASSWORD, AUTH_METHOD_PASSWORD_LEN);
}
- buf_setpos(typebuf, 0);
- buf_putstring(ses.writepayload, buf_getptr(typebuf, typebuf->len),
- typebuf->len);
+ buf_putbufstring(ses.writepayload, typebuf);
- TRACE(("auth fail: methods %d, '%s'", ses.authstate.authtypes,
- buf_getptr(typebuf, typebuf->len)));
+ TRACE(("auth fail: methods %d, '%.*s'", ses.authstate.authtypes,
+ typebuf->len, typebuf->data))
buf_free(typebuf);