Displaying 20 results from an estimated 25 matches for "buffer_consume".
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...;, c->self, p, len);
len++; /* trailing '\0' */
@@ -1078,7 +1092,7 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset)
fatal("channel %d: decode socks4: len %d > have %d",
c->self, len, have);
strlcpy(username, p, sizeof(username));
- buffer_consume(&c->input, len);
+ buffer_consume(input, len);
if (c->path != NULL) {
xfree(c->path);
@@ -1088,8 +1102,8 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset)
host = inet_ntoa(s4_req.dest_addr);
c->path = xstrdup(host);
} else { /* SOCKS4A: two st...
2002 May 10
1
Patch for SOCKS4A in OpenSsh
...apply this patch to openssh-3.1p1-1:
----------< cut >----------
--- openssh-3.1p1-1/channels.c Mon Mar 4 20:57:45 2002
+++ openssh-3.1p1-1-socks4a/channels.c Fri May 10 16:52:12 2002
@@ -908,11 +908,34 @@ channel_decode_socks4(Channel *c, fd_set
strlcpy(username, p, sizeof(username));
buffer_consume(&c->input, len);
buffer_consume(&c->input, 1); /* trailing '\0' */
- host = inet_ntoa(s4_req.dest_addr);
- strlcpy(c->path, host, sizeof(c->path));
c->host_port = ntohs(s4_req.dest_port);
+
+ /* check for socks4a vs socks4 */
+ if (0 == (s4_req.dest_addr.s_add...
2003 Jun 25
1
socks5 support for -D
...;NO AUTHENTICATION REQUIRED" */
+ for (found = 0, i = 2 ; i < nmethods + 2; i++) {
+ if (p[i] == SSH_SOCKS5_NOAUTH ) {
+ found = 1;
+ break;
+ }
+ }
+ if (!found) {
+ debug("channel %d: method SSH_SOCKS5_NOAUTH not found",
+ c->self);
+ return -1;
+ }
+ buffer_consume(&c->input, nmethods + 2);
+ buffer_put_char(&c->output, 0x05); /* version */
+ buffer_put_char(&c->output, SSH_SOCKS5_NOAUTH); /* method */
+ FD_SET(c->sock, writeset);
+ c->flags |= SSH_SOCKS5_AUTHDONE;
+ debug2("channel %d: socks5 auth done", c->self)...
2008 Sep 15
0
No subject
...buffer_len
in buffer_append_space
in buffer_ptr
in buffer_len
?in cipher_crypt
?cipher_crypt
?before evp-cipher
?return from? cipher_crypt
in buffer_clear
packet_send done
SSH2_MSG_KEXINIT sent
?before kex_reset_dispatch
?after kex_reset_dispatch
?packet_write_wait
in buffer_len
in buffer_ptr
in buffer_consume
?in packet_have_data_to_write
in buffer_len
in buffer_len
in buffer_append
in buffer_append_space
in buffer_len
in buffer_clear
in buffer_append_space
in buffer_ptr
?in cipher_crypt
?cipher_crypt
?before evp-cipher
?return from? cipher_crypt
in buffer_ptr
in buffer_consume
in buffer_len
in buffe...
2008 Sep 18
2
SSHD_PROBLEM
...buffer_len
in buffer_append_space
in buffer_ptr
in buffer_len
in cipher_crypt
cipher_crypt
before evp-cipher
return from cipher_crypt
in buffer_clear
packet_send done
SSH2_MSG_KEXINIT sent
before kex_reset_dispatch
after kex_reset_dispatch
packet_write_wait
in buffer_len
in buffer_ptr
in buffer_consume
in packet_have_data_to_write
in buffer_len
in buffer_len
in buffer_append
in buffer_append_space
in buffer_len
in buffer_clear
in buffer_append_space
in buffer_ptr
in cipher_crypt
cipher_crypt
before evp-cipher
return from cipher_crypt
in buffer_ptr
in buffer_consume
in buffer_len
in buffe...
2008 Jul 01
1
[PATCH] SOCKS4A support
...= strlen(p);
debug2("channel %d: decode socks4: user %s/%d", c->self, p, len);
+ len++; /* trailing '\0' */
if (len > have)
fatal("channel %d: decode socks4: len %d > have %d",
c->self, len, have);
strlcpy(username, p, sizeof(username));
buffer_consume(&c->input, len);
- buffer_consume(&c->input, 1); /* trailing '\0' */
- host = inet_ntoa(s4_req.dest_addr);
- strlcpy(c->path, host, sizeof(c->path));
+ if (need == 1) { /* SOCKS4: one string */
+ host = inet_ntoa(s4_req.dest_addr);
+ strlcpy(c->path, host, size...
2001 Oct 17
3
Bug when flushing data in openssh 2.9
...put any buffered data for stdout. */
while (buffer_len(&stdout_buffer) > 0) {
len = write(fileno(stdout), buffer_ptr(&stdout_buffer),
buffer_len(&stdout_buffer));
! if (len <= 0) {
! error("Write failed flushing stdout buffer.");
! break;
}
buffer_consume(&stdout_buffer, len);
stdout_bytes += len;
--- 937,953 ----
}
/* Output any buffered data for stdout. */
while (buffer_len(&stdout_buffer) > 0) {
+ errno=0; /* Linux doesn't reset this */
len = write(fileno(stdout), buffer_ptr(&stdout_buffer),
b...
2001 May 14
2
openssh-2.9p1
Hi,
1. I think you should apply the attached patch to openssh-2.9p1,
otherwise ssh-keyscan on linux boxes with glibc-2.1 will experience enormous
timeout delays.
2. Is there a program like ssh-keyscan for the Version2 (dsa and rsa) keys??
regards
Peter Breitenlohner <peb at mppmu.mpg.de>
-------------- next part --------------
diff -ur openssh-2.9p1.orig/ssh-keyscan.c
2001 Feb 22
3
intermittent stderr
The command "ssh ls -l /doesnotexist" gives various responses:
Running from a 200 MHz PentiumPro with dsa key added to ssh-agent:
Mistakes worst to fast machine:
To a faster 600 MHz dual processor i686 600 MHz machine:
ls: /doesnotexist: No such file or directory -- correct
nothing at all -- wrong
ls: select: Bad file descriptor -- wrong
2001 Jul 27
0
Updated ssh-keyscan patch for ssh2 support
...264,8 @@
return (tok);
}
-static void
-keyprint(char *host, char *output_name, char *kd, int len)
+static Key *
+keygrab_ssh1(con *c)
{
static Key *rsa;
static Buffer msg;
@@ -252,12 +274,12 @@
buffer_init(&msg);
rsa = key_new(KEY_RSA1);
}
- buffer_append(&msg, kd, len);
- buffer_consume(&msg, 8 - (len & 7)); /* padding */
+ buffer_append(&msg, c->c_data, c->c_plen);
+ buffer_consume(&msg, 8 - (c->c_plen & 7)); /* padding */
if (buffer_get_char(&msg) != (int) SSH_SMSG_PUBLIC_KEY) {
- error("%s: invalid packet type", host);
+ error(&quo...
2000 Jun 21
1
SSH 2.2.0
Yo All!
I have been playing with SSH 2.2.0 from www.ssh.com. I can not
connect to openssh 2.2.1p1 using Ver 2 protocol from ssh Ver 2.2.0.
Ver 1 works fine.
See below for the debug output from both ends
If I force hmac-md5 (-m hmac-md5) from the sender it works!
The other 3 choices fail: hmac-sha1; hmac-md5-96; and none.
I have no problem connecting to this openssh host (hobbes) from
2000 Apr 29
1
BUG: ssh-agent memory leak
Hey all!
I've been using OpenSSH on Linux since version 1.2.2; great work...
There is, however, a pretty noticable memory leak in ssh-agent.
I use ssh-agent to provide RSA authorization to automatically open an ssh
connection to download POP mail every three minutes.
When I was using the standard ssh-agent from 1.2.27 (not OpenSSH), I could
leave ssh-agent running for the entire uptime of
2001 Nov 06
13
OpenSSH 3.0
OpenSSH 3.0 has just been released. It will be available from the
mirrors listed at http://www.openssh.com/ shortly.
OpenSSH is a 100% complete SSH protocol version 1.3, 1.5 and 2.0
implementation and includes sftp client and server support.
This release contains many portability bug-fixes (listed in the
ChangeLog) as well as several new features (listed below).
We would like to thank the
2007 Nov 13
1
Help with openssh: ssh application writing data > 131071 to socket causing message too long error
...SSH2_MSG_CHANNEL_DATA :
SSH_MSG_CHANNEL_DATA);
packet_put_int(c->remote_id);
packet_put_string(buffer_ptr(&c-
>input), len);
packet_send();
buffer_consume(&c->input, len);
c->remote_window -= len;
The issue starts happening when the server side sends a window size of
131072. As seen from the above code ,the length of data only (and
excludes padding,mac,headers etc)is reduced from the remote window and
hence...
2006 Oct 09
1
About sftp-server root path
Hi,
I saw in archive that some people made a patch to sftp-server, and that patch
sets a root path.
I'd like to know if there's an ideia to apply that patch in main tree of
openssh?
With the use of SSHFS [wich uses sftp-server], it would be interesting to
have someting like that, because as we have netboot workstations, the access
to devices [such as, floppy, cdrom and usb data] are
2015 May 02
10
[Bug 2392] New: unable to ssh with umac has algorithm. error:Disconnecting packet:corrupted MAC on input.
https://bugzilla.mindrot.org/show_bug.cgi?id=2392
Bug ID: 2392
Summary: unable to ssh with umac has algorithm.
error:Disconnecting packet:corrupted MAC on input.
Product: Portable OpenSSH
Version: 5.0p1
Hardware: PPC
OS: Linux
Status: NEW
Severity: critical
Priority: P5
2001 Jun 20
1
SFTP Logging Redux.
...end(&iqueue, buf, len);
@@ -1095,6 +1154,7 @@
len = write(out, buffer_ptr(&oqueue), olen);
if (len < 0) {
error("write error");
+ log("(%d/%d/%s) SFTP session closing (%s).", ppid, cuid, CUNAME, "Write Error");
exit(1);
} else {
buffer_consume(&oqueue, len);
2001 Oct 24
2
disable features
.../* WITH_TCPFWD */
static int
channel_handle_rfd(Channel *c, fd_set * readset, fd_set * writeset)
@@ -1423,6 +1448,7 @@
channel_check_window(c);
}
+#ifdef WITH_PROTO13
static void
channel_post_output_drain_13(Channel *c, fd_set * readset, fd_set * writeset)
{
@@ -1437,67 +1463,118 @@
buffer_consume(&c->output, len);
}
}
+#endif
static void
channel_handler_init_20(void)
{
channel_pre[SSH_CHANNEL_OPEN] = &channel_pre_open_20;
- channel_pre[SSH_CHANNEL_X11_OPEN] = &channel_pre_x11_open;
+#ifdef WITH_TCPFWD
channel_pre[SSH_CHANNEL_PORT_LISTENER] = &channel_pre_li...
2001 Nov 09
4
keystroke timing attack
I'm reading this fine article on O'Reilly:
http://linux.oreillynet.com/lpt/a//linux/2001/11/08/ssh_keystroke.html
<quote>
The paper concludes that the keystroke timing data observable from
today's SSH implementations reveals a dangerously significant amount of
information about user terminal sessions--enough to locate typed
passwords in the session data stream and reduce the
2003 Oct 08
4
OS/390 openssh
...TA);
packet_put_int(c->remote_id);
+ /*if (strcmp(c->ctype, "session") == 0)*/
+ if (c->ctype[0] == 's')
packet_put_string(buffer_ptr(&c->input), len);
+ else
+ packet_put_binary(buffer_ptr(&c->input), len);
packet_send();
buffer_consume(&c->input, len);
c->remote_window -= len;
@@ -1787,7 +1791,11 @@
packet_start(SSH2_MSG_CHANNEL_EXTENDED_DATA);
packet_put_int(c->remote_id);
packet_put_int(SSH2_EXTENDED_DATA_STDERR);
+ /*if (strcmp(c->ctype, "session") == 0)*/
+ if (c->ctype[0] ==...