search for: packet_put_char

Displaying 20 results from an estimated 20 matches for "packet_put_char".

2004 Apr 07
2
Requiring multiple auth mechanisms
I looked around for a while, but couldn't find any code for requiring multiple authentication mechanisms in openssh. So I wrote an implemention. I thought at first I should change the PasswordAuthentication, PubkeyAuthentication, etc. keywords to allow no/yes/required. But there's some funky stuff in auth2.c with respect to keyboard interactive auth that would make this kind of
2000 Aug 15
0
Experimental -R support patch for openssh client
...pens[num_permitted_opens].listen_port = listen_port; - num_permitted_opens++; - /* Send the forward request to the remote side. */ if (compat20) { const char *address_to_bind = "0.0.0.0"; packet_start(SSH2_MSG_GLOBAL_REQUEST); packet_put_cstring("tcpip-forward"); - packet_put_char(0); /* boolean: want reply */ + /* Ask for reply so we know to expect 'forwarded-tcpip' messages */ + packet_put_char(1); /* Boolean 1 asks for reply */ packet_put_cstring(address_to_bind); packet_put_int(listen_port); - } else { + packet_send(); + packet_write_wait(); + + type...
2000 Aug 23
1
Protocol 2 remote forwarding patch
...1:38 2000 +++ openssh-2.1.1p4-jhchanges/auth2.c Tue Aug 22 19:43:09 2000 @@ -65,6 +65,7 @@ extern ServerOptions options; extern unsigned char *session_id2; extern int session_id2_len; +extern int user_authenticated_as_root; /* Jarno: From channels.c */ /* protocol */ @@ -239,6 +240,14 @@ packet_put_char(0); /* XXX partial success, unused */ packet_send(); packet_write_wait(); + } + + /* Jarno: Set the user_authenticated_as_root flag */ + if ( authenticated && pw && pw->pw_uid == (uid_t)0 ) { + user_authenticated_as_root = 1; + } + else { + user_authenticated_as_root...
2003 Mar 27
0
[Bug 524] Keyboard-interactive PAM back end hides information
...if (text) { - message_cat(&text, PAM_MSG_MEMBER(msg, i, msg)); - packet_put_cstring(text); - text = NULL; - } else - packet_put_cstring(PAM_MSG_MEMBER(msg, i, msg)); + packet_put_cstring(PAM_MSG_MEMBER(msg, i, msg)); packet_put_char(style == PAM_PROMPT_ECHO_ON); } packet_send(); --CUT-- ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
2001 Oct 29
0
signal messages
...+ if (send_signal == 2) { + send_signal = 0; + signame = sig2name(received_signal); + debug("Sending SIG%s to the remote host.", + signame); + packet_start(SSH2_MSG_CHANNEL_REQUEST); + packet_put_int(session_ident); + packet_put_cstring("signal"); + packet_put_char(0); + packet_put_cstring(signame); + packet_send(); } } Index: session.c =================================================================== RCS file: /cvs/src/usr.bin/ssh/session.c,v retrieving revision 1.108 diff -u -r1.108 session.c --- session.c 11 Oct 2001 13:45:21 -0000 1.108 +...
2003 Mar 02
0
[RFC][PATCH] Require S/KEY before other authentication methods.
...options.challenge_response_authentication_first = 0; + options.challenge_response_authentication = 0; + options.kbd_interactive_authentication = options.pam_authentication_via_kbd_int; + + methods = authmethods_get(); + packet_start(SSH2_MSG_USERAUTH_FAILURE); + packet_put_cstring(methods); + packet_put_char(1); /* XXX partial success, used */ + packet_send(); + packet_write_wait(); + xfree(methods); } } @@ -272,6 +289,11 @@ authmethods_get(void) char *list; int i; + /* If challenge-response is a prerequiste, advertise + that only */ + if (options.challenge_response_authentication_firs...
2016 Feb 14
5
[Bug 2541] New: Add explicit_bzero() before free() in OpenSSH-7.1p2 for auth1.c/auth2.c/auth2-hostbased.c
..., authenticated, method, NULL); + explicit_bzero(service, sizeof(*service)); free(service); + explicit_bzero(user, sizeof(*user)); free(user); + explicit_bzero(method, sizeof(*method)); free(method); return 0; } @@ -373,6 +379,7 @@ packet_put_char(partial); packet_send(); packet_write_wait(); + explicit_bzero(methods, sizeof(*methods)); free(methods); } } @@ -491,6 +498,7 @@ } ret = 0; out: + explicit_bzero(omethods, sizeof(*omethods)); fre...
2002 Jan 31
4
signal transmission in ssh2
...+ if (send_signal == 2) { + send_signal = 0; + signame = sig2name(received_signal); + debug("Sending SIG%s to the remote host.", + signame); + packet_start(SSH2_MSG_CHANNEL_REQUEST); + packet_put_int(session_ident); + packet_put_cstring("signal"); + packet_put_char(0); + packet_put_cstring(signame); + packet_send(); } } Index: session.c =================================================================== RCS file: /cvs/src/usr.bin/ssh/session.c,v retrieving revision 1.122 diff -u -r1.122 session.c --- session.c 29 Jan 2002 22:46:41 -0000 1.122 +...
2009 Feb 17
2
Idea: reverse socks proxy
Hi, Just a usecase that I'm sure has been covered before but just in case its not an openssh solution would be very helpful. I was trying to install software on a server that was firewalled so no outbound http connections would work. I was also tunnelling via another server. Outbound ssh connections also were a convenient option. What would have been nice would be a remote version of
2000 Dec 06
1
openssh-2.3.0p1 (Linux) fails using options with dss key
I'm trying to change my local setup from ssh2 to openssh-2.3.0p1. I need captive comands and specific environments for each key, i.e. the "command=XXX" and "environment=X=y" options. Unfortunately I *also* need to support the existing ssh2 client for a transition period, since it's impractical to change all user's environments to openssh in one go. I have converted
2004 Aug 05
1
LocalForward and RemoteForward bind patch
...forward request to the remote side. */ if (compat20) { - const char *address_to_bind = "0.0.0.0"; + const char *address_to_bind = + listen_host == NULL ? "0.0.0.0" : listen_host; packet_start(SSH2_MSG_GLOBAL_REQUEST); packet_put_cstring("tcpip-forward"); packet_put_char(1); /* boolean: want reply */ @@ -2297,6 +2299,7 @@ } } if (success) { + permitted_opens[num_permitted_opens].listen_host = listen_host == NULL ? NULL : xstrdup(listen_host); permitted_opens[num_permitted_opens].host_to_connect = xstrdup(host_to_connect); permitted_opens[num_permitt...
2001 Feb 10
3
Protocol 2 remote forwarding patch
...m_permitted_opens].port_to_connect = port_to_connect; - permitted_opens[num_permitted_opens].listen_port = listen_port; - num_permitted_opens++; - /* Send the forward request to the remote side. */ if (compat20) { const char *address_to_bind = "0.0.0.0"; @@ -1553,19 +1653,109 @@ packet_put_char(0); /* boolean: want reply */ packet_put_cstring(address_to_bind); packet_put_int(listen_port); - } else { + packet_send(); + packet_write_wait(); + success = 1; /* assume that server accepts the request and put + the forward request to permitted_opens */ + } else { /* protocol 1 */...
2008 Aug 27
1
5.1p1 doesn't work, 5.0p1 works fine
5.1p1 disconnects after the password prompt when connecting to my router and UPS. 5.1p1 connects fine to other unix hosts, and my Windows client connects fine to 5.1p1 servers. 5.0p1 works fine everywhere. I've tried ssh -T, ssh -t, permutations with ssh -o Compression=no -o TCPKeepAlive=no, etc, to no avail. I've used the default ssh_config file, and it still fails. Can anyone
2002 Apr 26
0
PAM keyboard-interactive
...e != PAM_PROMPT_ECHO_ON && style != PAM_PROMPT_ECHO_OFF) - continue; - - context_pam2.prompts[j++] = i; - if (text) { - message_cat(&text, PAM_MSG_MEMBER(msg, i, msg)); - packet_put_cstring(text); - text = NULL; - } else - packet_put_cstring(PAM_MSG_MEMBER(msg, i, msg)); - packet_put_char(style == PAM_PROMPT_ECHO_ON); - } - packet_send(); - packet_write_wait(); - - /* - * Grabbing control of execution and spinning until we get what - * we want is probably rude, but it seems to work properly, and - * the client *should* be in lock-step with us, so the loop should - * only be trav...
2002 Jul 02
3
New PAM kbd-int diff
...!= PAM_PROMPT_ECHO_ON && style != PAM_PROMPT_ECHO_OFF) - continue; - - context_pam2.prompts[j++] = i; - if (text) { - message_cat(&text, PAM_MSG_MEMBER(msg, i, msg)); - packet_put_cstring(text); - text = NULL; - } else - packet_put_cstring(PAM_MSG_MEMBER(msg, i, msg)); - packet_put_char(style == PAM_PROMPT_ECHO_ON); + return (PAM_SUCCESS); + fail: + while (i--) { + if (resp[i]->resp) { + memset(resp[i]->resp, '\0', strlen(resp[i]->resp)); + free(resp[i]->resp); + } } - packet_send(); - packet_write_wait(); + free(*resp); + *resp = NULL; + return (PAM_CO...
2003 Oct 08
4
OS/390 openssh
...T_EBCDIC +void packet_put_binary(const void *buf, u_int len); +void *packet_get_binary(u_int *length_ptr); +#else +#define packet_put_binary(_buf,_len) packet_put_string(_buf,_len) +#define packet_get_binary(_lenp) packet_get_string(_lenp) +#endif void packet_start(u_char); void packet_put_char(int ch); void packet_put_int(u_int value); diff -bur openssh-3.7.1p2.orig/scp.c openssh-3.7.1p2/scp.c --- openssh-3.7.1p2.orig/scp.c Fri Aug 22 01:34:41 2003 +++ openssh-3.7.1p2/scp.c Tue Oct 7 08:22:02 2003 @@ -201,6 +201,9 @@ uid_t userid; int errs, remin, remout; int pflag, iamremote, i...
2002 Jun 25
4
PAM kbd-int with privsep
...!= PAM_PROMPT_ECHO_ON && style != PAM_PROMPT_ECHO_OFF) - continue; - - context_pam2.prompts[j++] = i; - if (text) { - message_cat(&text, PAM_MSG_MEMBER(msg, i, msg)); - packet_put_cstring(text); - text = NULL; - } else - packet_put_cstring(PAM_MSG_MEMBER(msg, i, msg)); - packet_put_char(style == PAM_PROMPT_ECHO_ON); + return (PAM_SUCCESS); + fail: + while (i--) { + if (resp[i]->resp) { + memset(resp[i]->resp, '\0', strlen(resp[i]->resp)); + free(resp[i]->resp); + } } - packet_send(); - packet_write_wait(); + free(*resp); + *resp = NULL; + return (PAM_CO...
2003 Aug 10
9
updated gssapi diff
..._int(1); + + /* Some servers encode the OID incorrectly (as we used to) */ + if (datafellows & SSH_BUG_GSSAPI_BER) { + packet_put_string(supported->elements[mech].elements, + supported->elements[mech].length); + } else { + packet_put_int((supported->elements[mech].length)+2); + packet_put_char(SSH_GSS_OIDTYPE); + packet_put_char(supported->elements[mech].length); + packet_put_raw(supported->elements[mech].elements, + supported->elements[mech].length); + } + + packet_send(); + + dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_RESPONSE, &input_gssapi_response); + dispatch_set(SSH...
2014 Jul 15
3
GSSAPI
If I am trying to build OpenSSH 6.6 with Kerberos GSSAPI support, do I still need to get Simon Wilkinson's patches? --- Scott Neugroschl | XYPRO Technology Corporation 4100 Guardian Street | Suite 100 |Simi Valley, CA 93063 | Phone 805 583-2874|Fax 805 583-0124 |
2006 Nov 15
11
OpenSSH Certkey (PKI)
...r callback for USERAUTH_PK_OK message */ + dispatch_set(SSH2_MSG_USERAUTH_PK_OK, &input_userauth_pk_ok); + + packet_start(SSH2_MSG_USERAUTH_REQUEST); + packet_put_cstring(authctxt->server_user); + packet_put_cstring(authctxt->service); + packet_put_cstring(authctxt->method->name); + packet_put_char(have_sig); + if (!(datafellows & SSH_BUG_PKAUTH)) + packet_put_cstring(key_ssh_name(id->key)); + packet_put_string(blob, bloblen); + xfree(blob); + packet_put_string(id->key->cert, strlen(id->key->cert)); + packet_send(); + return 1; +} + +static int send_pubkey_test(Authctxt *...