Commit Graph

74 Commits

Author SHA1 Message Date
Matt Johnston
56855744b8 Only advertise a single server ecdsa key when -R (generate as required) is
specified. Fixes -R now that default ecdsa key size has changed.
2018-03-08 22:25:33 +08:00
Matt Johnston
9bbce01e1b merge from main
--HG--
branch : fuzz
2018-02-28 21:28:59 +08:00
Matt Johnston
6eabc0fe87 add guard HAVE_GETGROUPLIST 2018-02-27 21:49:10 +08:00
Matt Johnston
5df73215f8 merge from main
--HG--
branch : fuzz
2018-02-26 22:44:48 +08:00
François Perrad
2e836bb553 more linting (#58)
* const parameter

* fix indentation
2018-02-26 21:31:15 +08:00
Matt Johnston
36ccfd21e7 Fix restricted group code for BSDs, move to separate function 2018-02-26 21:17:13 +08:00
Matt Johnston
094972ea84 Merge branch 'master' of git://github.com/stellarpower/dropbear into stellarpower-master 2018-02-22 23:06:45 +08:00
CamVan Nguyen
4c95d595c0 Only load dropbear default host keys if a key is not specified 2018-02-22 21:55:15 +08:00
stellarpower
d17dedfa4f Added the -G option to allow logins only for users that are members of a certain group. This allows finer control of an instance on who can and cannot login over a certain instance (e.g. password and not key). Needs double-checking and ensuring it meets platform requirements. 2018-02-20 02:11:55 +00:00
Matt Johnston
7e8094d53a merge from main
--HG--
branch : fuzz
2018-02-17 19:29:51 +08:00
Michael Witten
3ee685ad1c options: Complete the transition to numeric toggles (`#if')
For the sake of review, this commit alters only the code; the affiliated
comments within the source files also need to be updated, but doing so
now would obscure the operational changes that have been made here.

* All on/off options have been switched to the numeric `#if' variant;
  that is the only way to make this `default_options.h.in' thing work
  in a reasonable manner.

* There is now some very minor compile-time checking of the user's
  choice of options.

* NO_FAST_EXPTMOD doesn't seem to be used, so it has been removed.

* ENABLE_USER_ALGO_LIST was supposed to be renamed DROPBEAR_USER_ALGO_LIST,
  and this commit completes that work.

* DROPBEAR_FUZZ seems to be a relatively new, as-yet undocumented option,
  which was added by the following commit:

    commit 6e0b539e9c
    Author: Matt Johnston <matt@ucc.asn.au>
    Date:   Tue May 23 22:29:21 2017 +0800

        split out checkpubkey_line() separately

  It has now been added to `sysoptions.h' and defined as `0' by default.

* The configuration option `DROPBEAR_PASSWORD_ENV' is no longer listed in
  `default_options.h.in'; it is no longer meant to be set by the user, and
  is instead left to be defined in `sysoptions.h' (where it was already being
  defined) as merely the name of the environment variable in question:

    DROPBEAR_PASSWORD

  To enable or disable use of that environment variable, the user must now
  toggle `DROPBEAR_USE_DROPBEAR_PASSWORD'.

* The sFTP support is now toggled by setting `DROPBEAR_SFTPSERVER', and the
  path of the sFTP server program is set independently through the usual
  SFTPSERVER_PATH.
2018-02-16 23:13:47 +08:00
Matt Johnston
597f7eb5e9 merge up to date
--HG--
branch : fuzz
2018-01-23 22:46:07 +08:00
Matt Johnston
74ace058a6 Use MAX_AUTH_TRIES rather than DEFAULT_AUTH_TRIES, don't limit argument range 2017-06-27 22:20:38 +08:00
Kevin Darbyshire-Bryant
e255101299 dropbear server: support -T max auth tries
Add support for '-T n' for a run-time specification for maximum number
of authentication attempts where 'n' is between 1 and compile time
option MAX_AUTH_TRIES.

A default number of tries can be specified at compile time using
'DEFAULT_AUTH_TRIES' which itself defaults to MAX_AUTH_TRIES for
backwards compatibility.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-06-25 11:53:58 +01:00
Matt Johnston
88ce30beb6 merge from main
--HG--
branch : fuzz
2017-06-14 23:31:42 +08:00
Francois Perrad
5f76e4c1ed when pointer, use NULL instead of 0 2017-06-02 18:14:31 +02:00
Matt Johnston
4dae8edb76 merge main to fuzz
--HG--
branch : fuzz
2017-05-18 23:45:10 +08:00
Matt Johnston
fb719e3d0b fuzz harness
--HG--
branch : fuzz
2017-05-13 22:50:54 +08:00
Matt Johnston
9f24cdf74c copy over some fuzzing code from AFL branch
--HG--
branch : fuzz
2017-05-12 23:14:54 +08:00
Matt Johnston
32a28d0d9c Convert #ifdef to #if, other build changes 2016-05-04 15:33:40 +02:00
Matt Johnston
103036c546 Add manpage and log for forced_command 2016-04-12 21:05:40 +08:00
Jeremy Kerr
ac9a4c839f Add -c <command> option to force a specific command
This change adds a -c option to dropbear, to force the session to use a
specific command, in a similar fashion to OpenSSH's ForceCommand
configuration option.

This is useful to provide a simple fixed service over ssh, without
requiring an authorized key file for the per-key forced_command option.

This setting takes precedence over the channel session's provided
command, and the per-key forced_command setting.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2016-04-12 21:01:08 +08:00
Konstantin Tokarev
2d6bbf341d Moved usingsyslog from svr_runopts to runopts. 2015-12-15 16:43:29 +03:00
Matt Johnston
e81b6fbc6e ports and addresses must be malloced to avoid segfault on exit 2015-12-02 22:37:20 +08:00
Matt Johnston
eedeb009ec mention dropbearkey too 2015-11-25 23:05:41 +08:00
Matt Johnston
d8bc6abcf0 Mention "dropbear -R" if no hostkeys 2015-11-25 23:05:14 +08:00
Guilhem Moulin
7fb1bec84a Enable bundling 2015-11-06 23:54:24 +08:00
Matt Johnston
e4827025be Warn rather than fail if flags have trailing parts 2015-10-28 21:37:35 +08:00
Matt Johnston
23cc2bfb8c don't silently ignore extra flag arguments 2015-10-21 22:05:50 +08:00
Matt Johnston
a7a79d569a Disable non-delayed zlib for server 2015-01-28 21:38:27 +08:00
Steven Honeyman
d88034434c Don't print "Failed loading hostkey" when -R delayed hostkey option is enabled 2014-10-22 07:12:52 +08:00
Matt Johnston
923fc9087c - Don't use multichar constants since recent gcc complains
- Add release script
- Simplify print_version
2014-07-27 22:55:29 +08:00
Matt Johnston
ed0552f214 Add '-V' for version
-h should exit with success
Update manpages
2014-07-27 22:06:26 +08:00
Matt Johnston
092a4d9a7e Fix disabling DSS key 2013-12-03 21:26:59 +08:00
Matt Johnston
9ff337aa3b Exit if we don't have keys and -R wasn't specified 2013-12-03 20:59:03 +08:00
Matt Johnston
de1deaf0bd use oldstyle comments 2013-11-14 22:03:30 +08:00
Matt Johnston
e60a84d0ed Various cleanups and fixes for warnings
--HG--
branch : ecc
2013-11-12 23:02:32 +08:00
Matt Johnston
58fe1c2d2a Add '-R' for delayed hostkey option
--HG--
branch : keyondemand
2013-11-07 23:49:37 +08:00
Matt Johnston
4363b8b32d refactor key generation, make it generate as required.
Needs UI in server command line options

--HG--
branch : keyondemand
2013-11-07 00:18:52 +08:00
Matt Johnston
aafeebd0c8 have separate ecdsa keys for each size
fix crash from the mp_alloc_init_multi change in RSA

--HG--
branch : ecc
2013-05-25 00:54:19 +08:00
Matt Johnston
0475594cb2 Fix broken disablekey()
--HG--
branch : ecc
2013-05-21 12:15:48 +08:00
Matt Johnston
95a21c8fd7 ecdsa is working
--HG--
branch : ecc
2013-05-03 23:07:48 +08:00
Matt Johnston
9dc30fbd2a Add URL to usage text 2013-03-21 23:10:47 +08:00
Matt Johnston
8393c5f016 Allow specifying server "-p" options with ipv6 bracket notation,
patch from Ben Jencks
2013-03-19 20:55:11 +08:00
Paul Eggleton
1205fa68df Allow configuring "allow blank password option" at runtime
Changes this from a compile-time switch to a command-line option.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-12 15:52:57 +00:00
Matt Johnston
6467b8d903 Split listening port argument at the rightmost colon, allows binding to
specific IPv6 addresses.

From OpenWRT,
https://dev.openwrt.org/browser/trunk/package/dropbear/patches/300-ipv6_addr_port_split.patch
2012-04-12 22:04:16 +08:00
Matt Johnston
0f83379dc0 Mention that the value is in seconds
--HG--
extra : convert_revision : fcdafc69f831ab356b34815958114cc3d75d23bb
2011-06-07 11:08:47 +00:00
Matt Johnston
38ed870ffe Improve capitalisation for all logged strings
--HG--
extra : convert_revision : 997e53cec7a9efb7413ac6e17b6be60a5597bd2e
2011-02-23 15:50:30 +00:00
Matt Johnston
e3ca0513a0 - Disable compression for non-final multihops
--HG--
extra : convert_revision : c507a2aacb9e0db4c0266891b8915c614e32857e
2009-09-11 14:02:04 +00:00
Matt Johnston
f88bed7a30 Rearrange getaddrstring() etc
--HG--
extra : convert_revision : 8a18c4a60aeaec085923d13d98fa0f93c506ceba
2009-09-01 16:38:26 +00:00