Bugzilla – Attachment 3088 Details for
Bug 2800
sftp fails to connect when login shell is t/csh and user's .cshrc generates output
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Output "(is your shell clean?)" for message too big only on initial request.
sftp-shell-clean.patch (text/plain), 1.46 KB, created by
Darren Tucker
on 2017-11-22 13:07:42 AEDT
(
hide
)
Description:
Output "(is your shell clean?)" for message too big only on initial request.
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2017-11-22 13:07:42 AEDT
Size:
1.46 KB
patch
obsolete
>Index: sftp-client.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/sftp-client.c,v >retrieving revision 1.127 >diff -u -p -r1.127 sftp-client.c >--- sftp-client.c 11 Aug 2017 04:41:08 -0000 1.127 >+++ sftp-client.c 22 Nov 2017 01:38:06 -0000 >@@ -116,7 +116,7 @@ send_msg(struct sftp_conn *conn, struct > } > > static void >-get_msg(struct sftp_conn *conn, struct sshbuf *m) >+get_msg_extended(struct sftp_conn *conn, struct sshbuf *m, int initial) > { > u_int msg_len; > u_char *p; >@@ -135,7 +135,8 @@ get_msg(struct sftp_conn *conn, struct s > if ((r = sshbuf_get_u32(m, &msg_len)) != 0) > fatal("%s: buffer error: %s", __func__, ssh_err(r)); > if (msg_len > SFTP_MAX_MSG_LENGTH) >- fatal("Received message too long %u", msg_len); >+ fatal("Received message too long %u%s", msg_len, >+ initial ? " (is your shell clean?)" : ""); > > if ((r = sshbuf_reserve(m, msg_len, &p)) != 0) > fatal("%s: buffer error: %s", __func__, ssh_err(r)); >@@ -150,6 +151,12 @@ get_msg(struct sftp_conn *conn, struct s > } > > static void >+get_msg(struct sftp_conn *conn, struct sshbuf *m) >+{ >+ get_msg_extended(conn, m, 0); >+} >+ >+static void > send_string_request(struct sftp_conn *conn, u_int id, u_int code, const char *s, > u_int len) > { >@@ -392,7 +399,7 @@ do_init(int fd_in, int fd_out, u_int tra > > sshbuf_reset(msg); > >- get_msg(ret, msg); >+ get_msg_extended(ret, msg, 1); > > /* Expecting a VERSION reply */ > if ((r = sshbuf_get_u8(msg, &type)) != 0)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2800
: 3088