Commit Graph

103 Commits

Author SHA1 Message Date
Matt Johnston
d7c1e58217 - Get rid of some ugly #defines
--HG--
extra : convert_revision : 4cfa02494ded17cdb068ec66581b720a5a0fd70b
2008-09-15 13:06:40 +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
e277059339 fix up after merge
--HG--
extra : convert_revision : 6107b89c1188975d0c60f50621afe593cb6e554f
2008-01-13 04:02:08 +00:00
Matt Johnston
a3b5d3c8b3 merge of '295b11312e327fe6c4f33512674ea4a1a9790344'
and '426d7aeea950d007ed7ef9f03f9f40b138a769cb'

--HG--
extra : convert_revision : d9cc9067a1a17f312a7349781f2dbbaf2890d5a6
2008-01-13 04:01:46 +00:00
Matt Johnston
bb0548b3b0 Make a copy of passwd fields since getpwnam()'s retval isn't safe to keep
--HG--
extra : convert_revision : 295b11312e327fe6c4f33512674ea4a1a9790344
2008-01-13 03:55:59 +00:00
Matt Johnston
b2ac4eb29b Actually use ~/.hushlogin rather than ~/hushlogin to ignore motd.
--HG--
extra : convert_revision : 426d7aeea950d007ed7ef9f03f9f40b138a769cb
2007-11-02 15:03:16 +00:00
Matt Johnston
7c1d4d1903 Revert to default sigchld handler after forking, don't exit
on error writing to the signal_pipe.

--HG--
branch : channel-fix
extra : convert_revision : 1d7826f7be07ee728abb42b6a9826d8ea7142fbe
2007-02-12 13:32:30 +00:00
Matt Johnston
22440a6fb2 - Fix bug in child-exit handling where the wrong pid was being matched.
- Also wait for errfd to close before closing the channel

--HG--
branch : channel-fix
extra : convert_revision : ed68ea8963f7d1fa600f81479e7e211efc5a31bc
2007-02-12 10:39:22 +00:00
Matt Johnston
f5ad5c1553 Improve behaviour when flushing out after a process has exited.
--HG--
branch : channel-fix
extra : convert_revision : e73ee8f7ae404a9355685c30828a0ad4524031bc
2007-02-09 10:43:16 +00:00
Matt Johnston
0f707bad11 propagate from branch 'au.asn.ucc.matt.dropbear' (head b1dd3b94e60a07a176dba2b035ac79968595990a)
to branch 'au.asn.ucc.matt.dropbear.channel-fix' (head fc77c3dea87a7c0f374e738d055f0b455495cbc3)

--HG--
branch : channel-fix
extra : convert_revision : dec459c955c306f9ecddc3b4e04a963f3f264a0f
2007-02-03 08:22:58 +00:00
Matt Johnston
c5fd7dd554 merge of '1250b8af44b62d8f4fe0f8d9fc7e7a1cc34e7e1c'
and '7f8670ac3bb975f40967f3979d09d2199b7e90c8'

--HG--
extra : convert_revision : 6b61c50f4cf888bea302ac8fcf5dbb573b443251
2007-02-03 08:20:30 +00:00
Matt Johnston
5092e30605 disapproval of revision '2186a678a5f79ef432f6593a10e3e13df2a313d5'
--HG--
extra : convert_revision : 1250b8af44b62d8f4fe0f8d9fc7e7a1cc34e7e1c
2007-02-03 08:09:55 +00:00
Matt Johnston
d5897b9a5d merge of '182c2d8dbd5321ef4d1df8758936f4dc7127015f'
and '31dcd7a22983ef19d6c63248e415e71d292dd0ec'

--HG--
extra : convert_revision : e84f66826c7ee6ebe99ef92cc0f6c22ecf638d01
2006-12-06 13:11:41 +00:00
Matt Johnston
7eee3ceb70 comment about putenv() leaking malloced variables
--HG--
extra : convert_revision : 80deca87cb2af2dde457882170b9095eeb9c2edb
2006-11-02 16:52:59 +00:00
Matt Johnston
20fb9ea351 make code clearer and more robust (from Klocwork)
--HG--
extra : convert_revision : 397b243ca9ec623ded7b5b93e115dc460527acca
2006-11-02 14:55:17 +00:00
Matt Johnston
cc340d9cdc Passes most test cases now
--HG--
branch : channel-fix
extra : convert_revision : 5a5f398411a7a3baa9472daa80fea0574fbd8a9a
2006-10-09 16:31:00 +00:00
Matt Johnston
df57eb3824 Rearranged some more bits, marked some areas that need work.
* send_msg_channel_data() no longer allocates a separate buffer
* getchannel() handles unknown channels so callers don't have to

--HG--
branch : channel-fix
extra : convert_revision : 3db645581be0fbb0d2ac8d218fbd55e096cbbbe5
2006-10-02 16:34:06 +00:00
Matt Johnston
7e04c5e277 just shuffle some variables names about, a brief comment
about the "bad writefd" problem

--HG--
branch : channel-fix
extra : convert_revision : f0b407c3d3e047ed83174e6f4ebd85a19352df5b
2006-10-01 16:35:13 +00:00
Matt Johnston
d1daf6531a merge of '9a4e042fd565f46141e81e0c1ab90260303348fe'
and 'bea3887a5875cf3ab8a1331e15e698b37b61fe37'

--HG--
extra : convert_revision : d05a6820ef6a95047d07edf66390e03afa32d556
2006-08-07 13:41:23 +00:00
Matt Johnston
e89b40e9c9 Add (disabled by default) LOG_COMMANDS option to log the commands executed
by clients.

--HG--
extra : convert_revision : bea3887a5875cf3ab8a1331e15e698b37b61fe37
2006-08-07 13:41:16 +00:00
Matt Johnston
c9319fbef5 Make flow of execution clearer for getting process exit status
--HG--
extra : convert_revision : 9a15e5205a3fd8ac4d23118f1857db9fa9d58a90
2006-07-07 09:18:05 +00:00
Matt Johnston
e8fa3ce478 progress towards exiting on writefd closure rather than
on process exit - dbclient hangs with scp, so requires work.

--HG--
extra : convert_revision : 2186a678a5f79ef432f6593a10e3e13df2a313d5
2006-06-11 16:19:32 +00:00
Matt Johnston
719b47e3aa send success message for successful window change request
--HG--
extra : convert_revision : 2a6c9eb6a9c0f8a0b7b479aaf075c8a195339fcd
2006-03-27 15:13:48 +00:00
Matt Johnston
882a9ced90 merge of 4c883eb469d2d251ee8abddbc11ae4005db6da17
and bed6155e95a293c9fce7e889d283b5958f3035dc

--HG--
extra : convert_revision : fff0894a0399405a9410ea1c6d118f342cf2aa64
2006-03-08 12:53:11 +00:00
Matt Johnston
422f4f2b41 * Per-IP connection unauthed connection limits
* m_close() exits fatally on failure
* other cleanups

--HG--
extra : convert_revision : bed6155e95a293c9fce7e889d283b5958f3035dc
2006-03-08 12:41:27 +00:00
Matt Johnston
a5a56874af merge of 50848a51c2f9867bc10e81826190dbc326ea16b9
and 84e3597daa468534c4a34231ae8761f841a0f5ae

--HG--
extra : convert_revision : 11ad05bc47809dbfe9510b78805f6ce52896d884
2006-02-28 04:04:27 +00:00
Matt Johnston
af485f89cd Merge of the uClinux-dist patch, should work in inetd mode
--HG--
extra : convert_revision : 976bfa569f133be97d6f57c89bffa0311a142be3
2006-02-28 04:03:49 +00:00
Matt Johnston
1eb9209afe Only read /dev/random once when the program starts
rather than for every connection, to "conserve entropy".

--HG--
extra : convert_revision : 21df240b71c0af8454725dec9abb428dd4bb97a2
2006-02-11 15:15:37 +00:00
Matt Johnston
a75c71299b * fix incorrect array sizing
--HG--
extra : convert_revision : e1322d52370db709625e024975f7c97fb8ed58c7
2005-12-08 11:45:33 +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
53681cbdb6 * use own assertions which should get logged properly
--HG--
extra : convert_revision : 3dc365619f0840ab5781660b1257a9f22c05d3fe
2005-09-05 15:16:10 +00:00
Matt Johnston
975b94c5f2 * fix off-by-one closing open FDs
--HG--
extra : convert_revision : cb23685eb24523d372c07830faea3a96e7c37917
2005-06-02 22:53:18 +00:00
Matt Johnston
a8785cf719 Seperate out exit errors from setgid()/initgroups(), and errors from setuid(),
to make debugging a bit easier

--HG--
extra : convert_revision : ea1f23ab2f94d0416e0bac38f63c9850396184c4
2005-05-27 16:34:57 +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
6013d993b9 put back 'return;' on empty terminal mode strings which was erroneously
removed in 3a6c6eeefe450a64e244ee39030938ddaacb8987

--HG--
extra : convert_revision : 75ed8083a683ebdb2fceca4a856d803fdeeb60af
2005-01-19 11:41:04 +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
5c6e8b833e Initialise the "lastexit" variable so that we don't get session channels
terminating prematurely.

--HG--
extra : convert_revision : 5cb8d5a7c8fe405fa4d49906f66a61590ae4a087
2004-10-17 08:19:47 +00:00
Matt Johnston
c2af67efd3 propagate of 82bb923d0154750ef716b66b498561f882891946 and f51a272341ee12268fe7028bc2f2bad66c603069 from branch 'matt.dbclient.work' to 'matt.dbclient.rez'
--HG--
branch : private-rez
extra : convert_revision : 440ee4177122c8a873ebf8984a90f96a9bd8a56a
2004-09-21 10:08:21 +00:00
Matt Johnston
cb0657bdf3 WCOREDUMP finally
--HG--
extra : convert_revision : 12aa4fdb328febedfd3fd50d1dae783d8a0dab14
2004-08-31 08:52:41 +00:00
Matt Johnston
69282617fd merge of 50be59810e462f9f44f55e421227d6aa0b31982b
and 69b007796063cb5f042be7cca2d479e90db869c3

--HG--
extra : convert_revision : 5d0dfaa8c0ee6c728a3b4f0f0855199ba729db83
2004-08-27 14:39:01 +00:00
Matt Johnston
51a74b4799 - added circular buffering for channels
- added stderr support for the client
- cleaned up a bunch of "unused" warnings, duplicated header definitions
- added exit-status support for the client

--HG--
extra : convert_revision : 5bdf806d8b440c87f7235414662f4189195618f4
2004-08-26 13:16:40 +00:00
Matt Johnston
4dd70c433e Mention the race condition between setting the childpid entry, and
the child exiting.

--HG--
extra : convert_revision : 0acd2d97675d6a45fa1664790b4b9c891461de10
2004-08-18 16:42:08 +00:00
Matt Johnston
954a8dce0f fix for AIX not having WCOREDUMP
--HG--
extra : convert_revision : 9a728aa6db6d1105267c377fa3d5448ee5f5a4ca
2004-08-17 09:56:23 +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
a712baa8e5 just checkpointing
--HG--
extra : convert_revision : fbbf404290f3fea3dfa9f6f53eba9389057e9044
2004-08-10 17:09:52 +00:00
Matt Johnston
051b7454f8 - Added terminal mode handling etc for the client, and window change
- Refactored the terminal-mode handling for the server
- Improved session closing for the client

--HG--
extra : convert_revision : 9d19b4f22c39798af5f3f24c2022f8caec4919e8
2004-08-01 08:54:01 +00:00
Matt Johnston
a76b1ba068 Progressing client support
--HG--
extra : convert_revision : 48946be1cef774d1c33b0f78689962b18720c627
2004-07-27 16:30:46 +00:00
Matt Johnston
62aab2227c switching to global vars
--HG--
extra : convert_revision : 800073097767c2ac153ab834cbcf0121cb765118
2004-07-20 12:05:00 +00:00
Matt Johnston
9f369bc42f Mostly done with the listener changeover
--HG--
extra : convert_revision : 1a4dca8836a2a04a21fb675c718a549a8d445d25
2004-06-03 17:22:48 +00:00
Matt Johnston
444dbb5364 - Reworked non-channel fd handling to listener.c
- More channel cleaning up

--HG--
extra : convert_revision : 385ec76d0304b93e277d1cc193383db5fd773703
2004-06-03 16:45:53 +00:00
Matt Johnston
513f947d62 Chantype handling is sorted
--HG--
extra : convert_revision : 807efead6ecf690f147fd8145aa9d78ff894cdb2
2004-06-02 04:59:49 +00:00
Matt Johnston
6152263045 Sorted out the first channel init issues.
--HG--
extra : convert_revision : 67676f36b78efac878c11943d78a5de827498d05
2004-06-01 10:48:46 +00:00
Matt Johnston
674a607488 Makefile.in contains updated files required
--HG--
extra : convert_revision : cc8a8c49dc70e632c352853a39801089b08149be
2004-06-01 02:46:09 +00:00