search for: buffer_ptr

Displaying 20 results from an estimated 55 matches for "buffer_ptr".

2008 Sep 15
0
No subject
...her_proposal ?in list_hostkey_types in buffer_init in buffer_len ?in key_ssh_name ?in KEY_RSA in buffer_append in buffer_append_space in buffer_len in buffer_append in buffer_append_space ?in key_ssh_name ?in KEY_DSA in buffer_append in buffer_append_space in buffer_append in buffer_append_space in buffer_ptr in buffer_free list_hostkey_types: ssh-rsa,ssh-dss ?in kex_setup in buffer_init in buffer_init ?before kex_send_kexinit in buffer_len kex_send_kexinit: kex proposal too short ?len=0 in buffer_ptr packet_start[20] in buffer_clear in buffer_append in buffer_append_space in buffer_ptr in buffer_len in...
2008 Sep 18
2
SSHD_PROBLEM
...her_proposal in list_hostkey_types in buffer_init in buffer_len in key_ssh_name in KEY_RSA in buffer_append in buffer_append_space in buffer_len in buffer_append in buffer_append_space in key_ssh_name in KEY_DSA in buffer_append in buffer_append_space in buffer_append in buffer_append_space in buffer_ptr in buffer_free list_hostkey_types: ssh-rsa,ssh-dss in kex_setup in buffer_init in buffer_init before kex_send_kexinit in buffer_len kex_send_kexinit: kex proposal too short len=0 in buffer_ptr packet_start[20] in buffer_clear in buffer_append in buffer_append_space in buffer_ptr in buffer_len in...
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...output = &c->input; + } else { + input = &c->input; + output = &c->output; + } debug2("channel %d: decode socks4", c->self); - have = buffer_len(&c->input); + have = buffer_len(input); len = sizeof(s4_req); if (have < len) return 0; - p = buffer_ptr(&c->input); + p = buffer_ptr(input); need = 1; /* SOCKS4A uses an invalid IP address 0.0.0.x */ @@ -1065,12 +1079,12 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset) } if (found < need) return 0; - buffer_get(&c->input, (char *)&s4_req.versio...
2008 Jul 01
1
[PATCH] SOCKS4A support
...e_socks4(Channel *c, fd_set *readset, fd_set *writeset) { char *p, *host; - u_int len, have, i, found; + u_int len, have, i, found, need; char username[256]; struct { u_int8_t version; @@ -1044,10 +1044,20 @@ channel_decode_socks4(Channel *c, fd_set if (have < len) return 0; p = buffer_ptr(&c->input); + + need = 1; + /* SOCKS4A uses an invalid IP address 0.0.0.x */ + if (!p[4] && !p[5] && !p[6] && p[7]) { + debug2("channel %d: socks4a request", c->self); + /* ... and needs an extra string (the hostname) */ + need = 2; + } + /* Check for...
2006 Feb 16
2
PAM and passwd age warnings again.
...plen); + xfree (p); + buffer_free(&m); } diff -Naur openssh-4.2p1.old/monitor_wrap.c openssh-4.2p1.new/monitor_wrap.c --- openssh-4.2p1.old/monitor_wrap.c Sun Jul 17 03:53:31 2005 +++ openssh-4.2p1.new/monitor_wrap.c Tue Dec 20 09:09:16 2005 @@ -631,6 +631,9 @@ buffer_put_string(&m, buffer_ptr(&input), buffer_len(&input)); buffer_put_string(&m, buffer_ptr(&output), buffer_len(&output)); + /* Let's not forget our loginmsg, now, eh? */ + buffer_put_string(&m, buffer_ptr(&loginmsg), buffer_len(&loginmsg)); + mm_request_send(monitor->m_recvfd, MON...
2000 Apr 26
1
http://marc.theaimsgroup.com/?l=openssh-unix-dev&m=95669367427640&w=2 (fwd)
....c =================================================================== RCS file: /cvs/src/usr.bin/ssh/clientloop.c,v retrieving revision 1.21 diff -u -r1.21 clientloop.c --- clientloop.c 2000/04/19 07:05:48 1.21 +++ clientloop.c 2000/04/26 01:54:54 @@ -873,6 +873,8 @@ len = write(fileno(stdout), buffer_ptr(&stdout_buffer), buffer_len(&stdout_buffer)); if (len <= 0) { + if (errno == EGAIN) + continue; error("Write failed flushing stdout buffer."); break; } @@ -884,6 +886,8 @@ len = write(fileno(stderr), buffer_ptr(&stderr_buffer), buffer_len...
2011 Jun 02
2
preauth privsep logging via monitor
...@ -465,6 +494,45 @@ monitor_sync(struct monitor *pmonitor) } } +static int +monitor_read_log(struct monitor *pmonitor) +{ + Buffer logmsg; + u_int len, level; + char *msg; + + buffer_init(&logmsg); + buffer_append_space(&logmsg, 4); + if (atomicio(read, pmonitor->m_log_recvfd, + buffer_ptr(&logmsg), buffer_len(&logmsg)) != buffer_len(&logmsg)) { + if (errno == EPIPE) { + debug("%s: child log fd closed", __func__); + close(pmonitor->m_log_recvfd); + pmonitor->m_log_recvfd = -1; + return -1; + } + fatal("%s: log fd read: %s", __func__, s...
2001 Oct 17
3
Bug when flushing data in openssh 2.9
...g patch, everything started to work for me: *** clientloop-old.c Wed Oct 17 22:05:30 2001 --- clientloop.c Wed Oct 17 22:01:46 2001 *************** *** 937,947 **** } /* Output 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....
2005 Sep 21
23
[Bug 1087] SSH fails to show PAM password expiry message from LDAP on login
http://bugzilla.mindrot.org/show_bug.cgi?id=1087 djm at mindrot.org changed: What |Removed |Added ---------------------------------------------------------------------------- Group|Portable OpenSSH | ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
2003 Oct 08
4
OS/390 openssh
...els.c Tue Oct 7 08:22:00 2003 @@ -1752,7 +1752,11 @@ packet_start(compat20 ? SSH2_MSG_CHANNEL_DATA : SSH_MSG_CHANNEL_DATA); 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...
2002 Jan 27
0
IdentityFile patch
...en(pw->pw_name)); - cp++; - continue; - } - buffer_append(&buffer, cp, 1); - } - buffer_append(&buffer, "\0", 1); - - /* - * Ensure that filename starts anchored. If not, be backward - * compatible and prepend the '%h/' - */ - file = xmalloc(MAXPATHLEN); - cp = buffer_ptr(&buffer); - if (*cp != '/') - snprintf(file, MAXPATHLEN, "%s/%s", pw->pw_dir, cp); - else - strlcpy(file, cp, MAXPATHLEN); - - buffer_free(&buffer); - return file; -} - char * authorized_keys_file(struct passwd *pw) { diff -ur openssh-3.0.2p1/auth.h openssh-3.0.2p1...
2005 Jun 12
2
%h,%p,%u expansion for ControlPath
...} + if (cp[0] == '%' && cp[1] == 'u') { + buffer_append(&path, options.user, strlen(options.user)); + cp++; + continue; + } + buffer_append(&path, cp, 1); + } + buffer_append(&path, "\0", 1); + options.control_path = xstrdup(buffer_ptr(&path)); + } } if (options.control_path != NULL && options.control_master == 0) control_client(options.control_path); /* This doesn't return */ --- openssh-4.1p1/sshconnect.c~ 2005-03-14 12:08:12.000000000 +0000 +++ openssh-4.1p1/sshconnect.c 2005-06-12 09:36:33.000000000 +0...
2002 Nov 20
0
[PATCH #9] Password expiration via /bin/passwd.
...eck. */ +#ifdef USE_PAM if (is_pam_password_change_required()) { print_pam_messages(); - do_pam_chauthtok(); + if (!use_privsep) + do_pam_chauthtok(); } #endif + buffer_append(&expire_message, "\0", 1); + if (password_change_required) { + printf("%s", (char *)buffer_ptr(&expire_message)); + do_tty_change_password(pw); + password_changed = 1; + } if (check_quietlogin(s, command)) return; @@ -764,10 +774,11 @@ if (!is_pam_password_change_required()) print_pam_messages(); #endif /* USE_PAM */ -#ifdef WITH_AIXAUTHENTICATE - if (aixloginmsg &&amp...
2000 Dec 28
2
sshd doesn't log which RSA key was used
Hi guys, and another feature request for sshd which I would classify as really useful. And I think this behaviour is currently not available (If yes, sorry, I must have missed it): > I believe that the sshd should log which RSA key was used to connect to > an account. When there are a number of keys in the authorized_keys file > it is often useful to know which one was used for each
2002 Jan 27
1
[PATCH] Add user-dependent IdentityFile to OpenSSH-3.0.2p1
...en(pw->pw_name)); - cp++; - continue; - } - buffer_append(&buffer, cp, 1); - } - buffer_append(&buffer, "\0", 1); - - /* - * Ensure that filename starts anchored. If not, be backward - * compatible and prepend the '%h/' - */ - file = xmalloc(MAXPATHLEN); - cp = buffer_ptr(&buffer); - if (*cp != '/') - snprintf(file, MAXPATHLEN, "%s/%s", pw->pw_dir, cp); - else - strlcpy(file, cp, MAXPATHLEN); - - buffer_free(&buffer); - return file; -} - char * authorized_keys_file(struct passwd *pw) { diff -ur openssh-3.0.2p1/auth.h openssh-3.0.2p1...
2010 Jan 14
1
ssh(1) multiplexing rewrite
...fd, readset) && + (c->istate == CHAN_INPUT_OPEN || + c->istate == CHAN_INPUT_WAIT_DRAIN)) { + /* + * Don't not read past the precise end of packets to + * avoid disrupting fd passing. + */ + if (read_mux(c, 4) < 4) /* read header */ + return; + need = get_u32(buffer_ptr(&c->input)); +#define CHANNEL_MUX_MAX_PACKET (256 * 1024) + if (need > CHANNEL_MUX_MAX_PACKET) { + debug2("channel %d: packet too big %u > %u", + c->self, CHANNEL_MUX_MAX_PACKET, need); + chan_rcvd_oclose(c); + return; + } + if (read_mux(c, need + 4) < ne...
2013 Sep 24
9
[PATCH] curve25519-sha256@libssh.org key exchange proposal
...en); + buffer_put_string(&b, client_dh_pub, CURVE25519_PUBKEY_SIZE); + buffer_put_string(&b, server_dh_pub, CURVE25519_PUBKEY_SIZE); + buffer_put_bignum2(&b, shared_secret); + +#ifdef DEBUG_KEX + buffer_dump(&b); +#endif + EVP_DigestInit(&md, evp_md); + EVP_DigestUpdate(&md, buffer_ptr(&b), buffer_len(&b)); + EVP_DigestFinal(&md, digest, NULL); + + buffer_free(&b); + +#ifdef DEBUG_KEX + dump_digest("hash", digest, EVP_MD_size(evp_md)); +#endif + *hash = digest; + *hashlen = EVP_MD_size(evp_md); +} diff --git a/kexc25519c.c b/kexc25519c.c new file mode 10...
2003 Jan 18
0
[Patch] User-dependent IdentityFile
...en(pw->pw_name)); - cp++; - continue; - } - buffer_append(&buffer, cp, 1); - } - buffer_append(&buffer, "\0", 1); - - /* - * Ensure that filename starts anchored. If not, be backward - * compatible and prepend the '%h/' - */ - file = xmalloc(MAXPATHLEN); - cp = buffer_ptr(&buffer); - if (*cp != '/') - snprintf(file, MAXPATHLEN, "%s/%s", pw->pw_dir, cp); - else - strlcpy(file, cp, MAXPATHLEN); - - buffer_free(&buffer); - return file; -} - char * authorized_keys_file(struct passwd *pw) { diff -ru ssh/auth.h sshJ/auth.h --- ssh/auth.h...
2002 Jan 29
2
Key fingerprint logging
...(authctxt->postponed) return; /* XXX todo: check if multiple auth methods are needed */ @@ -475,12 +479,16 @@ #ifdef DEBUG_PK buffer_dump(&b); #endif /* test for correct signature */ if (user_key_allowed(authctxt->pw, key) && - key_verify(key, sig, slen, buffer_ptr(&b), buffer_len(&b)) == 1) + key_verify(key, sig, slen, buffer_ptr(&b), buffer_len(&b)) == 1) { authenticated = 1; + + if (options.log_key_fingerprint == 1) + snprintf(info,info_size," fp %s",key_fingerprint(key,SSH_FP_MD5,SSH_FP_HEX)); + } buffe...
2003 Jul 09
0
[PATCH] Add expired password handling for AIX.
...from; struct passwd * pw = s->pw; + int password_changed = 0; pid_t pid = getpid(); /* @@ -758,6 +764,13 @@ print_pam_messages(); do_pam_chauthtok(); } +#else + buffer_append(&expiremsg, "\0", 1); + if (password_change_required) { + printf("%s\n", (char *)buffer_ptr(&expiremsg)); + fflush(stdout); + password_changed = do_tty_change_password(pw); + } #endif if (check_quietlogin(s, command)) @@ -766,6 +779,9 @@ #ifdef USE_PAM if (options.use_pam && !is_pam_password_change_required()) print_pam_messages(); +#else + if (!password_changed)...