Displaying 20 results from an estimated 88 matches for "packet_send".
2010 Mar 16
4
ipconfig: DHCP fixes
Hi,
Here are two fixes for ipconfig/dhcp, the second of them being required for my
dhcp3 server to accept ipconfig's requests.
Thanks,
Louis
Louis Rilling (2):
ipconfig: Fix missing dhcp_end field
ipconfig: Fix null ciaddr on DHCPREQUEST during SELECTING state
usr/kinit/ipconfig/dhcp_proto.c | 4 ++--
usr/kinit/ipconfig/packet.c | 2 +-
2 files changed, 3
2010 Apr 26
1
valgrind ipconfig work
...lly complaining on ipconfig eth0:
ERROR SUMMARY: 5 errors from 4 contexts (suppressed: 0 from 0)
all errors where stack allocations pointing to unitialized values,
now:
ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0
as bonus cleanup a bit coding style of packet_send().
Signed-off-by: maximilian attems <max at stro.at>
diff --git a/usr/kinit/ipconfig/netdev.c b/usr/kinit/ipconfig/netdev.c
index 6e3014f..e203d0c 100644
--- a/usr/kinit/ipconfig/netdev.c
+++ b/usr/kinit/ipconfig/netdev.c
@@ -43,6 +43,7 @@ static int netdev_sif_addr(struct ifreq *if...
2002 Feb 04
1
forkoff()
...{
buffer_append(&stdin_buffer, "\004", 1);
} else if (!stdin_eof) {
/*
* Sending SSH_CMSG_EOF alone does not always appear
* to be enough. So we try to send an EOF character
* first.
*/
packet_start(SSH_CMSG_STDIN_DATA);
packet_put_string("\004", 1);
packet_send();
/* Close stdin. */
stdin_eof = 1;
if (buffer_len(&stdin_buffer) == 0) {
packet_start(SSH_CMSG_EOF);
packet_send();
}
}
if (detach) {
/*
* There should be a chan_wont_read()/chan_wont_write()
* API, differing only in the debug messages used.
*/
chan_read_failed(c...
2003 Mar 02
0
[RFC][PATCH] Require S/KEY before other authentication methods.
...txt *authctxt, int
if (authctxt->postponed)
return;
- /* XXX todo: check if multiple auth methods are needed */
- if (authenticated == 1) {
- /* turn off userauth */
- dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &dispatch_protocol_ignore);
- packet_start(SSH2_MSG_USERAUTH_SUCCESS);
- packet_send();
- packet_write_wait();
- /* now we can break out */
- authctxt->success = 1;
- } else {
+ if (!authenticated) {
if (authctxt->failures++ > AUTH_FAIL_MAX) {
packet_disconnect(AUTH_FAIL_MSG, authctxt->user);
}
@@ -252,6 +243,32 @@ userauth_finish(Authctxt *authctxt, int...
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
2001 Oct 24
2
disable features
...tate for X11 authentication spoofing. An opened X11
* connection (when authentication spoofing is being done) remains in this
@@ -831,6 +843,7 @@
return 1;
}
+#ifdef WITH_PROTO13
static void
channel_pre_x11_open_13(Channel *c, fd_set * readset, fd_set * writeset)
{
@@ -855,6 +868,7 @@
packet_send();
}
}
+#endif
static void
channel_pre_x11_open(Channel *c, fd_set * readset, fd_set * writeset)
@@ -876,7 +890,9 @@
debug("X11 closed %d i%d/o%d", c->self, c->istate, c->ostate);
}
}
+#endif /* WITH_X11FWD */
+#ifdef WITH_DYNFWD
/* try to decode a socks4 header *...
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
2002 Feb 01
1
FEATURE: -f -f - fork after successful open of fwd port/display/agent
...er_append(&stdin_buffer, "\004", 1);
+ } else if (!stdin_eof) {
+ /*
+ * Sending SSH_CMSG_EOF alone does not always appear
+ * to be enough. So we try to send an EOF character
+ * first.
+ */
+ packet_start(SSH_CMSG_STDIN_DATA);
+ packet_put_string("\004", 1);
+ packet_send();
+ /* Close stdin. */
+ stdin_eof = 1;
+ if (buffer_len(&stdin_buffer) == 0) {
+ packet_start(SSH_CMSG_EOF);
+ packet_send();
+ }
+ }
+
+ if (detach) {
+ chan_read_failed(c);
+ chan_write_failed(c);
+ channel_close_fds(c);
+ fd = open(_PATH_DEVNULL, O_RDWR, 0);
+ if (fd < 0)
+...
2000 Aug 23
1
Protocol 2 remote forwarding patch
...9: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 = 0;
}
xfree(service);
diff -u -r openssh-2.1.1p4/...
2000 Aug 15
0
Experimental -R support patch for openssh client
...g("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 = packet_read(&payload_len); /* Expect reply from server */
+ switch (type) {
+ case SSH2_MSG_REQUEST_SUCCESS:
+ success = 1;
+ break;
+ case SSH2_MSG_REQUEST_FAILURE:
+ log("Warning: Server doesn't do port forwarding.");
+ break;
+...
2007 Jul 10
1
[Bug 1338] New: Idletimeout for both client and server
...in packet.c was not organized like it is now with
wrapper functions calling ssh1/ssh2 versions. I think I put calls to
idletimeout_check() in the right places but I could have missed one or
added too much.
* For the writing case, I added an idletimeout_check() in
packet_start instead of in the packet_send, assuming that packet_send
will be called soon after packet_start.
* If this patch is combined with the ControlPersist patch, it should
be possible request that ssh only performs the timeout when ssh is
daemonized as a master. This could be done by making ControlPersist
take the same time value...
2012 Dec 21
0
File Attachments for previous bug report
..., sizeof(rawsalt));
return ret;
}
@@ -360,7 +360,7 @@
debug3("%s: scheme = %s", __func__, *hash_scheme);
JPAKE_DEBUG_BN((*s, "%s: s = ", __func__));
#endif
- bzero(secret, secret_len);
+ memset(secret, 0, secret_len);
xfree(secret);
}
@@ -401,12 +401,12 @@
packet_send();
packet_write_wait();
- bzero(hash_scheme, strlen(hash_scheme));
- bzero(salt, strlen(salt));
+ memset(hash_scheme, 0, strlen(hash_scheme));
+ memset(salt, 0, strlen(salt));
xfree(hash_scheme);
xfree(salt);
- bzero(x3_proof, x3_proof_len);
- bzero(x4_proof, x4_proof_len);
+...
2011 Mar 28
5
[PATCH 1/3] Only peek and discard packets from specified device.
...iscard(s->dev);
+ }
break;
}
}
-
- if (ret == 0)
- packet_discard();
-
return ret;
}
diff --git a/usr/kinit/ipconfig/packet.c b/usr/kinit/ipconfig/packet.c
index 84267b7..993a2fa 100644
--- a/usr/kinit/ipconfig/packet.c
+++ b/usr/kinit/ipconfig/packet.c
@@ -167,17 +167,18 @@ int packet_send(struct netdev *dev, struct iovec *iov, int iov_len)
}
/*
- * Fetches a bootp packet, but doesn't remove it.
+ * Fetches a bootp packet from specified device, but doesn't remove it.
* Returns:
* 0 = Error
* >0 = A packet of size "ret" is available for interface ifinde...
2002 Jan 11
1
X11 forwarding, -f, error handling
I'd like a feature whereby ssh puts itself in the background after the
first successful X11 (or other port) forwarding.
The reason for this is simple: error handling.
If the application fails to open the X display and exits, then the
client can still exit with the application's exit code. But if the
application opens the X display successfully, then it can just display
any errors by
2009 Apr 07
2
[PATCH] ipconfig: send hostname in DHCP request
...nd(struct netdev *dev, struct iovec *vec)
vec[1].iov_base = &bootp;
vec[1].iov_len = sizeof(struct bootp_hdr);
- vec[4].iov_base = vendor_class_identifier;
- vec[4].iov_len = vendor_class_identifier_len;
-
DEBUG(("xid %08x secs %d ", bootp.xid, ntohs(bootp.secs)));
- return packet_send(dev, vec, DHCP_IOV_LEN);
+ if (vendor_class_identifier_len > 2) {
+ vec[i].iov_base = vendor_class_identifier;
+ vec[i].iov_len = vendor_class_identifier_len;
+ i++;
+
+ DEBUG(("vendor_class_identifier \"%.*s\" ",
+ vendor_class_identifier_len-2,
+ vend...
2001 Mar 14
1
[PATCH] Added Null packet keepalive option
...g = 1;
- }
+
+ }
+ break;
+
+ case 0:
+ /* Send a keepalive packet (not SSH_MSG_IGNORE as this crashes
+ * some servers...).
+ */
+ packet_start(SSH_MSG_NONE);
+ packet_send();
+ break;
+
+ default:
+ break;
+ }
}
void
2007 Nov 13
1
Help with openssh: ssh application writing data > 131071 to socket causing message too long error
...packet_start(compat20 ?
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,header...
2016 Feb 12
2
Test Failure OpenSSH 7.1 P2 on HPE NSE for integrity
...ut_channel_req: channel 0 rtype exit-signal reply 0
The code for this is in session_exit_message() and looks like:
if (WIFEXITED(status)) {
channel_request_start(s->chanid, "exit-status", 0);
packet_put_int(WEXITSTATUS(status));
packet_send();
} else if (WIFSIGNALED(status)) {
channel_request_start(s->chanid, "exit-signal", 0);
so your printf is probably dying with a signal rather than exiting.
Which signal? dunno, but my guess would be SIGPIPE. Try adding
something like this to the top of sessi...
2012 Dec 20
4
Deprecated calls to bzero() and index() found in OpenSSH 6.1p1
...ret;
}
@@ -360,7 +360,7 @@
debug3("%s: scheme = %s", __func__, *hash_scheme);
JPAKE_DEBUG_BN((*s, "%s: s = ", __func__));
#endif
- bzero(secret, secret_len);
+ memset(secret, 0, secret_len);
xfree(secret);
}
@@ -401,12 +401,12 @@
packet_send();
packet_write_wait();
- bzero(hash_scheme, strlen(hash_scheme));
- bzero(salt, strlen(salt));
+ memset(hash_scheme, 0, strlen(hash_scheme));
+ memset(salt, 0, strlen(salt));
xfree(hash_scheme);
xfree(salt);
- bzero(x3_proof, x3_proof_len);...
2002 Feb 05
0
New forkoff() and chan_wont_read/write() API
...+ /* fake EOF on stdin for SSHv1 */
+ if (!compat20 && !stdin_eof) {
+ /*
+ * Sending SSH_CMSG_EOF alone does not always appear
+ * to be enough. So we try to send an EOF character
+ * first.
+ */
+ packet_start(SSH_CMSG_STDIN_DATA);
+ packet_put_string("\004", 1);
+ packet_send();
+ /* Close stdin. */
+ stdin_eof = 1;
+ if (buffer_len(&stdin_buffer) == 0) {
+ packet_start(SSH_CMSG_EOF);
+ packet_send();
+ }
+ }
+
+ if (!compat20)
+ return;
+
+ c = channel_lookup(session_ident);
+ if (c == NULL)
+ error("couldn't lookup session channel");
+
+ if...