Displaying 20 results from an estimated 106 matches for "buffer_append".
Did you mean:
buffer_append_c
2002 Jan 27
0
IdentityFile patch
...er buffer;
- char *file;
- const char *cp;
-
- /*
- * Build the filename string in the buffer by making the appropriate
- * substitutions to the given file name.
- */
- buffer_init(&buffer);
- for (cp = filename; *cp; cp++) {
- if (cp[0] == '%' && cp[1] == '%') {
- buffer_append(&buffer, "%", 1);
- cp++;
- continue;
- }
- if (cp[0] == '%' && cp[1] == 'h') {
- buffer_append(&buffer, pw->pw_dir, strlen(pw->pw_dir));
- cp++;
- continue;
- }
- if (cp[0] == '%' && cp[1] == 'u') {
- buffer_ap...
2002 Jan 27
1
[PATCH] Add user-dependent IdentityFile to OpenSSH-3.0.2p1
...er buffer;
- char *file;
- const char *cp;
-
- /*
- * Build the filename string in the buffer by making the appropriate
- * substitutions to the given file name.
- */
- buffer_init(&buffer);
- for (cp = filename; *cp; cp++) {
- if (cp[0] == '%' && cp[1] == '%') {
- buffer_append(&buffer, "%", 1);
- cp++;
- continue;
- }
- if (cp[0] == '%' && cp[1] == 'h') {
- buffer_append(&buffer, pw->pw_dir, strlen(pw->pw_dir));
- cp++;
- continue;
- }
- if (cp[0] == '%' && cp[1] == 'u') {
- buffer_ap...
2008 Sep 15
0
No subject
...fore fill_default_server_options
after fill_default_server_options
sshd version OpenSSH_3.7.1p2
before lodaing private keys
?after lodaing private keys
?after lodaing private keys
options.host_key_files[i]=/etc/ssh/ssh_host_rsa_key
?in key_load_private
?before key_load_public_rsa1
in buffer_init
in buffer_append_space
in buffer_get
leaving from buffer_get
in buffer_free
?before key_load_private_pem
?returning from key_load_private
?after key_load_private
private host key: #0 type 1 RSA
options.host_key_files[i]=/etc/ssh/ssh_host_dsa_key
?in key_load_private
?before key_load_public_rsa1
in buffer_init
in bu...
2008 Sep 18
2
SSHD_PROBLEM
...fore fill_default_server_options
after fill_default_server_options
sshd version OpenSSH_3.7.1p2
before lodaing private keys
after lodaing private keys
after lodaing private keys
options.host_key_files[i]=/etc/ssh/ssh_host_rsa_key
in key_load_private
before key_load_public_rsa1
in buffer_init
in buffer_append_space
in buffer_get
leaving from buffer_get
in buffer_free
before key_load_private_pem
returning from key_load_private
after key_load_private
private host key: #0 type 1 RSA
options.host_key_files[i]=/etc/ssh/ssh_host_dsa_key
in key_load_private
before key_load_public_rsa1
in buffer_init
in bu...
2003 Jan 18
0
[Patch] User-dependent IdentityFile
...er buffer;
- char *file;
- const char *cp;
-
- /*
- * Build the filename string in the buffer by making the appropriate
- * substitutions to the given file name.
- */
- buffer_init(&buffer);
- for (cp = filename; *cp; cp++) {
- if (cp[0] == '%' && cp[1] == '%') {
- buffer_append(&buffer, "%", 1);
- cp++;
- continue;
- }
- if (cp[0] == '%' && cp[1] == 'h') {
- buffer_append(&buffer, pw->pw_dir, strlen(pw->pw_dir));
- cp++;
- continue;
- }
- if (cp[0] == '%' && cp[1] == 'u') {
- buffer_ap...
2005 Jun 12
2
%h,%p,%u expansion for ControlPath
...char strport[NI_MAXSERV];
+
+ /* Convert the port number into a string. */
+ snprintf(strport, sizeof strport, "%hu", options.port);
+
+ buffer_init(&path);
+ for (cp = options.control_path; *cp; cp++) {
+ if (cp[0] == '%' && cp[1] == '%') {
+ buffer_append(&path, "%", 1);
+ cp++;
+ continue;
+ }
+ if (cp[0] == '%' && cp[1] == 'h') {
+ buffer_append(&path, host, strlen(host));
+ cp++;
+ continue;
+ }
+ if (cp[0] == '%' && cp[1] == 'p') {
+ buffer_appe...
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...e(input, len);
}
c->host_port = ntohs(s4_req.dest_port);
@@ -1119,7 +1133,7 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset)
s4_rsp.command = 90; /* cd: req granted */
s4_rsp.dest_port = 0; /* ignored */
s4_rsp.dest_addr.s_addr = INADDR_ANY; /* ignored */
- buffer_append(&c->output, &s4_rsp, sizeof(s4_rsp));
+ buffer_append(output, &s4_rsp, sizeof(s4_rsp));
return 1;
}
@@ -1145,12 +1159,21 @@ channel_decode_socks5(Channel *c, fd_set *readset, fd_set *writeset)
u_int16_t dest_port;
u_char *p, dest_addr[255+1], ntop[INET6_ADDRSTRLEN];
u_int...
2001 Mar 26
1
duplicated lines in serverloop.c? (openssh252p2)
...3 if (len < 0 && (errno == EINTR || errno == EAGAIN)) {
+294 /* do nothing */
+295 } else if (len <= 0) {
+296 fdout_eof = 1;
+297 } else {
+298 buffer_append(&stdout_buffer, buf, len);
+299 fdout_bytes += len;
+300 }
+301 }
+302 /* Read and buffer any available stderr data from the
program. */
+303 if (!fderr_eof && FD_ISSET(fderr, readset)) {
+304...
2002 Nov 20
0
[PATCH #9] Password expiration via /bin/passwd.
...if (loginsuccess(authctxt->user,
- get_canonical_hostname(options.verify_reverse_mapping),
- "ssh", &aixloginmsg) < 0)
- aixloginmsg = NULL;
+ get_canonical_hostname(options.verify_reverse_mapping),
+ "ssh", &msg) < 0)
+ msg = NULL;
+ buffer_append(&login_message, msg, strlen(msg));
+ } else {
+ debug("authenticate() failed for user %s: %.100s", pw->pw_name, authmsg);
+ }
+ if (authmsg)
+ xfree(authmsg);
return(authsuccess);
#endif
@@ -232,4 +246,43 @@
/* Authentication is accepted if the encrypted passwords are iden...
2004 Aug 26
2
OpenSSH PATCH: OpenCommand and CloseCommand
...t, "%hu", port);
+
+ /*
+ * Build the final command string in the buffer by making the
+ * appropriate substitutions to the given proxy command.
+ *
+ * Use "exec" to avoid "sh -c" processes on some platforms
+ * (e.g. Solaris)
+ */
+ buffer_init(&command);
+ buffer_append(&command, "exec ", 5);
+
+ for (cp = run_command; *cp; cp++) {
+ if (cp[0] == '%' && cp[1] == '%') {
+ buffer_append(&command, "%", 1);
+ cp++;
+ continue;
+ }
+ if (cp[0] == '%' && cp[1] == 'h') {
+ buffer_appen...
2009 May 03
10
[Bug 1595] New: Server option PrintLastLog does not work on AIX
...ix.c, we can see the following:
if (loginsuccess((char *)user, (char *)host, (char *)ttynm, &msg) == 0)
{
success = 1;
if (msg != NULL && loginmsg != NULL && !msg_done) {
debug("AIX/loginsuccess: msg %s", msg);
buffer_append(loginmsg, msg, strlen(msg));
xfree(msg);
msg_done = 1;
}
}
The pointer "msg" points to the new last login info for the user and it
always appended to the loginmsg buffer.
The buffer_append call should only be called if options.prin...
2003 Jun 25
1
socks5 support for -D
...c->self, c->path, c->host_port, s5_req.command);
+
+ s5_rsp.version = 0x05;
+ s5_rsp.command = SSH_SOCKS5_SUCCESS;
+ s5_rsp.reserved = 0; /* ignored */
+ s5_rsp.atyp = SSH_SOCKS5_IPV4;
+ ((struct in_addr *)&dest_addr)->s_addr = INADDR_ANY;
+ dest_port = 0; /* ignored */
+
+ buffer_append(&c->output, (char *)&s5_rsp, sizeof(s5_rsp));
+ buffer_append(&c->output, (char *)&dest_addr, sizeof(struct in_addr));
+ buffer_append(&c->output, (char *)&dest_port, sizeof(dest_port));
+ return 1;
+}
+
/* dynamic port forwarding */
static void
channel_pre_dynam...
2004 Aug 09
1
[PATCH] RPA authentication mechanism
...rpa_read_buffer(auth->pool, &p, end, &auth->user_response);
+ if (len != RPA_UCHALLENGE_LEN) {
+ *error = "invalid user response";
+ return FALSE;
+ }
+
+ if (p != end) {
+ *error = "unneeded data found";
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static void
+buffer_append_asn1_length(buffer_t *buf, unsigned int length)
+{
+ if (length < 0x80) {
+ buffer_append_c(buf, length);
+ } else if (length < 0x100) {
+ buffer_append_c(buf, 0x81);
+ buffer_append_c(buf, length);
+ } else {
+ buffer_append_c(buf, 0x82);
+ buffer_append_c(buf, length >> 8);
+ bu...
2003 Jul 05
0
[PATCH] Replace AIX loginmsg with generic Buffer loginmsg
..."ssh" */
if (loginsuccess(authctxt->user,
- get_canonical_hostname(options.use_dns),
- "ssh", &aixloginmsg) < 0) {
- aixloginmsg = NULL;
+ get_canonical_hostname(options.use_dns), "ssh", &msg) == 0){
+ if (msg != NULL) {
+ buffer_append(&loginmsg, msg, strlen(msg));
+ xfree(msg);
+ }
}
+ } else {
+ debug3("AIX/authenticate failed for user %s: %.100s",
+ pw->pw_name, authmsg);
}
+ if (authmsg != NULL)
+ xfree(authmsg);
return (authsuccess);
# endif
Index: auth.c
===============================...
2000 Jan 07
2
possible clue on tcp forwarding problems
When I encounter the problem with TCP port forwarding locking up, I'll
see this on the client window (if I haven't invoked ssh with -q):
chan_shutdown_read failed for #1/fd6: Transport endpoint is not connected
chan_shutdown_read failed for #1/fd6: Transport endpoint is not connected
This is with Blowfish encryption. I have to kill and restart the client
when this happens.
Phil
2003 Oct 08
4
OS/390 openssh
...auth2-pubkey.c Tue Oct 7 08:21:59 2003
@@ -65,7 +65,7 @@
if (datafellows & SSH_BUG_PKAUTH) {
debug2("userauth_pubkey: SSH_BUG_PKAUTH");
/* no explicit pkalg given */
- pkblob = packet_get_string(&blen);
+ pkblob = packet_get_binary(&blen);
buffer_init(&b);
buffer_append(&b, pkblob, blen);
/* so we have to extract the pkalg from the pkblob */
@@ -73,7 +73,7 @@
buffer_free(&b);
} else {
pkalg = packet_get_string(&alen);
- pkblob = packet_get_string(&blen);
+ pkblob = packet_get_binary(&blen);
}
pktype = key_type_from_name(pkalg);...
2005 Apr 05
0
FETCH order fix backport to stable from test66
...;m most concerned about in my port is whether I got the
buffer_insert call right (back-ported from an array_insert call) in
imap-fetch.c :-
@@ -119,8 +129,14 @@
memset(&h, 0, sizeof(h));
h.handler = handler;
h.context = context;
+ h.buffered = buffered;
- buffer_append(ctx->handlers, &h, sizeof(h));
+ if (!buffered)
+ buffer_append(ctx->handlers, &h, sizeof(h));
+ else {
+ buffer_insert(ctx->handlers, ctx->buffered_handlers_count * size
of(h), &h, sizeof(h));
+ ctx->buffered_handler...
2010 Jun 14
1
Patch to fix leak in imap_refresh_proctitle in beta[5, 6]
...0x00000001059a35c3 pool_data_stack_realloc + 72 ->
3 libdovecot.0.dylib 0x0000000105994d59 buffer_alloc + 59 ->
4 libdovecot.0.dylib 0x0000000105994ef9 buffer_check_limits + 127 ->
5 libdovecot.0.dylib 0x00000001059950e8 buffer_append + 38 ->
6 imap 0x0000000105867333 imap_refresh_proctitle + 218 ->
7 imap 0x000000010585f18e client_command_input + 190 ->
[...]
or
2 libdovecot.0.dylib 0x00000001059a35c3 pool_data_stack_realloc + 72 -&g...
2008 Jul 12
2
[Bug 1486] New: Improperly used buffer during KEX
...is appended into a buffer that has not been
cleared first. This could lead to problems - in particular, if that
buffer already contains an old peer proposal, the new one will be
appended but the old one will be silently used instead.
The code is currently:
ptr = packet_get_raw(&dlen);
buffer_append(&kex->peer, ptr, dlen);
but should be:
ptr = packet_get_raw(&dlen);
buffer_clear(&kex->peer);
buffer_append(&kex->peer, ptr, dlen);
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: ------...
2000 Nov 02
2
misc. minor patches
...cket.c
--- openssh-2.1.1p1.orig/packet.c Wed May 17 08:53:35 2000
+++ openssh-2.1.1p1/packet.c Tue Jun 20 16:39:00 2000
@@ -356,7 +356,7 @@
char buf[9];
buffer_clear(&outgoing_packet);
- memset(buf, 0, 8);
+ memset(buf, 0, 9);
buf[8] = type;
buffer_append(&outgoing_packet, buf, 9);
}