Commit Graph

33 Commits

Author SHA1 Message Date
Matt Johnston
32a28d0d9c Convert #ifdef to #if, other build changes 2016-05-04 15:33:40 +02:00
Francois Perrad
3e20c442de fix empty C prototypes 2016-03-16 22:41:20 +08:00
Matt Johnston
645b254173 Merge branch '20151231_indent' of https://github.com/fperrad/dropbear into fperrad-20151231_indent 2016-03-15 21:41:06 +08:00
Chocobo1
9bcd5f3c0a Fix print format specifier 2016-01-05 12:37:48 +08:00
Francois Perrad
9bda22e702 more hard tab 2016-01-01 15:02:09 +01:00
Matt Johnston
1a4db21fe4 buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
Gaël PORTAY
20f1e49b73 Turn many local variables into char *
reqname, bindaddr, request_addr, desthost and orighost to be exhaustive.
2015-05-05 20:39:14 +02:00
Gaël PORTAY
224b16b247 Fix pointer differ in signess warnings [-Werror=pointer-sign] 2015-05-05 20:39:13 +02:00
Matt Johnston
364a53577e Move generic network routines to netio.c
--HG--
branch : fastopen
2015-02-20 23:16:38 +08:00
Matt Johnston
755c1458f0 async connections working
--HG--
branch : fastopen
2015-02-18 22:46:15 +08:00
Matt Johnston
9abcc7b909 connect_remote() is now always non-blocking 2015-02-14 09:56:11 +08:00
Matt Johnston
da57dd13c5 Set tcp priority as follows:
if (connecting || ptys || x11) tos = LOWDELAY;
else if (tcp_forwards) tos = 0;
else tos = BULK;

TCP forwards could be either lowdelay or bulk, hence the default priority.
2014-07-16 22:53:32 +08:00
Matt Johnston
50a5d3756f Send a failure response if a client receives a global request 2014-07-08 21:59:36 +08:00
Matt Johnston
de1deaf0bd use oldstyle comments 2013-11-14 22:03:30 +08:00
Matt Johnston
1984aabc95 Server shouldn't return "localhost" in response to -R forward connections
if that wasn't what the client requested.
2012-05-09 21:09:34 +08:00
Matt Johnston
2a02c4084a - Don't sent SSH_MSG_UNIMPLEMENTED if we don't have ENABLE_SVR_REMOTETCPFWD
- Fix build if ENABLE_SVR_REMOTETCPFWD is disabled but ENABLE_SVR_LOCALTCPFWD
  is enabled
2012-05-09 20:33:16 +08:00
Matt Johnston
b9e21e2367 Fix crash when remote forwarding was requested
--HG--
extra : convert_revision : 5c0a794976692a54ec36111291179020e2ae6c1e
2011-04-07 13:39:10 +00:00
Matt Johnston
665b768cef Fix leak found by Klocwork
--HG--
extra : convert_revision : 51ce088e100e9ea150efc6bf3d021f019a46b2f5
2011-04-07 13:38:27 +00:00
Matt Johnston
85288d7b61 - Progress for allowing specifying a listenaddr for tcp forwards
--HG--
extra : convert_revision : 48fdaa8706d1acda35e9d564adc9a1fbc96c18c8
2010-02-24 16:13:15 +00:00
Matt Johnston
c0ce2a6a97 * Patch from Frédéric Moulins adding options to authorized_keys.
Needs review.

--HG--
branch : pubkey-options
extra : convert_revision : 26872f944d79ddacff1070aab32115a6d726392c
2008-09-08 15:14:02 +00:00
Matt Johnston
4cb673b644 Fixes from Erik Hovland:
cli-authpubkey.c:
    fix leak of keybuf

cli-kex.c:
    fix leak of fingerprint fp

cli-service.c:
    remove commented out code

dropbearkey.c:
    don't attepmt to free NULL key on failure

common-kex.c:
    only free key if it is initialised

keyimport.c:
    remove dead encrypted-key code
    don't leak a FILE* loading OpenSSH keys

rsa.c, dss.c:
    check return values for some libtommath functions

svr-kex.c:
    check return value retrieving DH kex mpint

svr-tcpfwd.c:
    fix null-dereference if remote tcp forward request fails

tcp-accept.c:
    don't incorrectly free the tcpinfo var

--HG--
extra : convert_revision : 640a55bc710cbaa6d212453c750026c770e19193
2006-07-07 09:17:18 +00:00
Matt Johnston
d8e61e51de * svr-tcpfwd.c: should be MAX_NAME_LEN not MAXNAMLEN
--HG--
extra : convert_revision : f3f6f865b6d723add601feabf155a1fcc084b0aa
2006-01-15 06:39:48 +00:00
Matt Johnston
6c56271e8c * fix -L forwarding on the client, broke last rev
--HG--
extra : convert_revision : 826db75f8001f7da7b0b8c91dcf66a44bf107b49
2005-12-06 16:51:55 +00:00
Matt Johnston
a673d60963 * add -g (dbclient) and -a (dropbear) options for allowing non-local
hosts to connect to forwarded ports. Rearranged various some of the
	tcp listening code.
	* changed to /* */ style brackets in svr-authpam.c

--HG--
extra : convert_revision : c1e04e648867db464fe9818c4910e4320cd50c32
2005-12-04 16:13:11 +00:00
Matt Johnston
b131f74533 * rename infd/outfd to writefd/readfd, to avoid confusion
--HG--
extra : convert_revision : e3e7dc2cf75ad60c83a5b4307c210fee2fe90434
2005-10-20 16:53:12 +00:00
Matt Johnston
f45eafe342 * fix longstanding bug with connections being closed on failure to
connect to auth socket (server)
* differentiate between get_byte and get_bool
* get rid of some // comments
* general tidying

--HG--
extra : convert_revision : fb8d188ce33b6b45804a5ce51b9f601f83bdf3d7
2005-03-13 13:58:14 +00:00
Matt Johnston
8c1a429c44 Fixed DEBUG_TRACE macro so that we don't get semicolons left about the place
--HG--
extra : convert_revision : d928bc851e32be7bd429bf7504b148c0e4bf7e2f
2005-01-02 20:25:56 +00:00
Matt Johnston
e7677a5e8d Rearrange preprocessor parts so that compilation with various options
disabled works OK.

--HG--
extra : convert_revision : cc92f744e34125062d052b757967e167f19d6db5
2004-12-22 15:37:50 +00:00
Matt Johnston
703c9a7370 License boilerplate etc, add Mihnea as an author to some of the files
--HG--
extra : convert_revision : 75c02f80c4ed25bd4697e7f17ffac6eded54c148
2004-08-14 17:54:20 +00:00
Matt Johnston
8e1ec24f55 Merging in the changes from 0.41-0.43 main Dropbear tree
--HG--
extra : convert_revision : 4c3428781bc8faf0fd7cadd7099fbd7f4ea386e7
2004-08-12 16:41:58 +00:00
Matt Johnston
e1057cd477 TCP forwarding works.
--HG--
extra : convert_revision : 57dfb36d0d482ad84f31506904eb67863bd303ab
2004-08-12 13:48:42 +00:00
Matt Johnston
453261a042 - A nice cleaner structure for tcp (acceptor) forwarding.
- still a checkpoint-ish commit
- sorted out listening on localhost only

--HG--
extra : convert_revision : c030ac0a3950dba81f2324e2ba9d4b77fc8f8149
2004-08-11 17:26:47 +00:00
Matt Johnston
a712baa8e5 just checkpointing
--HG--
extra : convert_revision : fbbf404290f3fea3dfa9f6f53eba9389057e9044
2004-08-10 17:09:52 +00:00