Commit Graph

92 Commits

Author SHA1 Message Date
Gustavo Zacarias
c2505381d0 dropbear: bump to version 2015.71
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-12-03 21:45:27 +01:00
Peter Korsgaard
1069d0fc8c dropbear: bump version to 2015.70
Bugfix release, fixes password auth support detection.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-11-26 16:29:55 +01:00
Gustavo Zacarias
37ec6ceaa8 dropbear: bump to version 2015.69
Fixes a port-forwarding regression in 2015.68

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-11-25 23:24:09 +01:00
Peter Korsgaard
04e401e20a dropbear: dropbear.service: /etc/default/dropbear is optional
The environment file is for optional customization, so don't error out if it
isn't present.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-11-09 23:11:52 +01:00
Cyril Bur
60016a6818 package/dropbear: Respect user specific configurations
systemd .service file should respect /etc/default/dropbear

Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-11-02 22:43:06 +01:00
Luca Ceresoli
5e3da92d7e dropbear: bump to 2015.68
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-15 22:22:12 +02:00
Maxime Hadjinlian
0f75b2635e package: Replace 'echo -n' by 'printf'
'echo -n' is not a POSIX construct (no flag support), we shoud use
'printf', especially in init script.

This patch was generated by the following command line:
git grep -l 'echo -n' -- `git ls-files | grep -v 'patch'` | xargs sed -i 's/echo -n/printf/'

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-04 00:56:41 +02:00
Yann E. MORIN
8012250b86 package/dropbear: add warning about volatile keys
When the rootfs is read-only, keys will be generated in a volatile
location, which is inherently bad as host keys will change on each boot,
rendering them virtually useless.

Add a warning so the user is at least aware of the issue.

Hide the rm output to avoid noisy output, now that we have a proper warning.

Move the starting message after the symlink-block, to avoid messages
collision. Move the umask as well, since /etc/dropbear/ may be world
readable; just the private host keys should be ?00 (and dropbear handles
that by itself).

[Peter: minor tweaks to commit message]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-08-30 22:05:29 +02:00
Yann E. MORIN
29a0f05579 package/dropbear: fix when readlink is from busybox
Busybox "readlink -f" does not canonicalise paths when the target is
missing, while coreutils do.

Fix that by:
  - making an absolute symlink
  - dropping "-f" when calling readlink

Fixes #8276.

Reported-by: Jason Tang <tang@jtang.org>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Tested-by: Jason Tang <tang@jtang.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-08-24 17:06:06 +02:00
Paul Cercueil
6dc5c7ffea package/dropbear: Fix symlink only if pointing to the right directory
This commit ensures that the /etc/dropbear symlink won't be removed if
it points elsewhere than /var/run/dropbear.

[Thomas:
 - fix indentation / too long lines as suggested by Yann E. Morin.]

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-30 23:36:02 +02:00
Yann E. MORIN
e7d04dd2df package/dropbear: fix generating keys on RO file systems
dropbear generates its keys at the first connection, and wants to save
them in /etc/dropbear (not configurable).

Currently, our /etc/dropbear is a directory.

When the filesystem is read-only, dropbear can't save its keys, so
refuses all connections.

Fix that with:

  - at build time, create /etc/dropbear as a symlink to
    /var/run/dropbear

  - at runtime, if the filesystem is RW (we can rm /etc/dropbear),
    we replace the symlink with an actual directory; otherwise,
    when the filesystem is RO (we can't rm /etc/dropbear), we create
    /var/run/dropbear so the symlink points to an existing directory

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Acked-by: "Maxime Hadjinlian" <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-14 01:24:26 +02:00
Mike Williams
3aa96c1e5a dropbear: move systemd service file to /usr/lib
Signed-off-by: Mike Williams <mike@mikebwilliams.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-03-20 20:39:09 +01:00
Maxim Mikityanskiy
a5a705d2c9 package/dropbear: install dropbear.service to correct dir
The place for package-provided systemd units is /lib/systemd/system.
/etc/systemd/system is for custom units.
Reviewed-by: Samuel Martin <s.martin49@gmail.com>

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-02-23 12:38:12 +01:00
Floris Bos
b49e4cf3ec dropbear: add extra build customization options
v2: only offer option to disable building SSH client.
    do not offer options to disable password authentication and TCP forwarding.

Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-02-07 12:52:25 +01:00
Gustavo Zacarias
1e48670167 dropbear: bump to version 2015.67
Switch sed options around since defaults have changed.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-01-28 21:48:02 +01:00
Jerzy Grzegorek
27dd32942e package: indentation cleanup
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-12-30 11:17:03 +01:00
Jerzy Grzegorek
8314ddf584 package: cleanup whitespace of assignments
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-12-18 22:58:28 +01:00
Thomas Petazzoni
665e13c85e Rename BR2_PREFER_STATIC_LIB to BR2_STATIC_LIBS
Since a while, the semantic of BR2_PREFER_STATIC_LIB has been changed
from "prefer static libraries when possible" to "use only static
libraries". The former semantic didn't make much sense, since the user
had absolutely no control/idea of which package would use static
libraries, and which packages would not. Therefore, for quite some
time, we have been starting to enforce that BR2_PREFER_STATIC_LIB
should really build everything with static libraries.

As a consequence, this patch renames BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS, and adjust the Config.in option accordingly.

This also helps preparing the addition of other options to select
shared, shared+static or just static.

Note that we have verified that this commit can be reproduced by
simply doing a global rename of BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS plus adding BR2_PREFER_STATIC_LIB to Config.in.legacy.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-12-11 22:48:13 +01:00
André Erdmann
5f617ffa17 sysv init scripts: fix == bashism
test a == b is not available in e.g. dash.

Command(s) used for editing:

  q=\[\"\'\]
  operand="${q}?[$]?[a-zA-Z0-9_\?]+${q}?"  ## doesn't detect ${VAR}
  test_expr="(\[\s+${operand}\s+)==(\s+${operand}\s+\])"

  find . -type f -name '[SK][0-9][0-9]*' | \
     xargs sed -r -e "s@${test_expr}@\1=\2@g" -i

Signed-off-by: André Erdmann <dywi@mailerd.de>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-11-11 23:08:46 +01:00
Gustavo Zacarias
b1c2c47bd7 dropbear: bump to version 2014.66
And add hash file.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-23 22:09:26 +02:00
Thomas De Schampheleire
aaffd209fa packages: rename FOO_CONF_OPT into FOO_CONF_OPTS
To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS,
make the same change for FOO_CONF_OPT.

Sed command used:
   find * -type f | xargs sed -i 's#_CONF_OPT\>#&S#g'

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-04 18:54:16 +02:00
Gustavo Zacarias
b781001179 dropbear: bump to version 2014.65
Fixes some regressions introduced by 2014.64

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-08-08 22:19:20 +02:00
Gustavo Zacarias
b282e95ec8 dropbear: bump to version 2014.64
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-27 22:35:20 +02:00
Maxime Hadjinlian
fe823b6374 dropbear: fix missing directory with systemd
The current SysV startup script create a directory which is necessary
for dropbear to correctly work.
This creation is not done with systemd.

Instead of both init creating the directory, we add the creation of this
directory to the INSTALL_TARGET_CMDS to make sure it's present.

[Peter: use make syntax for TARGET_DIR as pointed out by Thomas]
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-28 10:01:44 +02:00
Peter Korsgaard
171fb7aa0c dropbear: bump version
Fixes a number of issues. From the changelog:

- Avoid getting stuck in a loop writing huge key files, reported by Bruno
  Thomsen
- Avoid crash on exit due to cleaned up keys before last packets are sent,
  debugged by Ronald Wahl
- Fix a race condition in rekeying where Dropbear would exit if it received a
  still-in-flight packet after initiating rekeying. Reported by Oliver Metz.
  This is a longstanding bug but is triggered more easily since 2013.57
- Ensure that generated RSA keys are always exactly the length
  requested. Previously Dropbear always generated N+16 or N+15 bit keys.
  Thanks to Unit 193
- Fix DROPBEAR_CLI_IMMEDIATE_AUTH mode which saves a network round trip if the
  first public key succeeds. Still not enabled by default, needs more
  compatibility testing with other implementations.
- Fix signal handlers so that errno is saved, thanks to Erik Ahlén for a patch
  and Mark Wickham for independently spotting the same problem.

And at the same time get rid of the TIMEVAL_TO_TIMESPEC as dropbear provides a
fallback implementation if not available (and has done so since 2006).

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-19 21:46:01 +01:00
Thomas De Schampheleire
d6c096fd09 dropbear: add support for custom arguments through config file
The default port 22 used by dropbear for its SSH connections is not always
desired. Dropbear accepts an option '-p' to set the port, but doing this was
not possible from the buildroot-provided init script.

One way to fix this is by adding a custom S50dropbear in a project-specific
rootfs overlay. However, this approach has the big disadvantage that bug
fixes or improvements in the default init script (i.e. in newer buildroot
releases) are not available (unless you manually port these changes each
time you upgrade buildroot).

Another solution is to modify the default init script from a
project-specific post-build script. However, this is fragile because you'd
have to sed some line but this line may change in later buildroot releases.

Yet another solution is to change the default port at build time, by
patching the options.h header file in the dropbear sources. This was
proposed with a patch [1] before, but not accepted.

This patch implements another solution, hinted from the discussion in [1]:
the default init script now sources a config file /etc/default/dropbear, in
which the user can set the variable DROPBEAR_ARGS. This is similar to the
S81named init script in the bind package. The config file would be added to
a project-specific rootfs overlay, a custom skeleton, or created from a
post-build script.
This approach has the advantage of being simple and non-intrusive, without
any code duplication or fragile script modifications.

[1] http://lists.busybox.net/pipermail/buildroot/2013-November/083165.html

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-01-02 15:06:34 +01:00
Gustavo Zacarias
408743d29d dropbear: bump to version 2013.62
Bump to version 2013.62 with ECC support.
Switch the initscript to on-demand key generation and add systemd unit
file.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-04 14:29:11 +01:00
Gustavo Zacarias
a95b9d77d1 dropbear: bump to version 2013.60
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-10-22 11:30:06 +02:00
Peter Korsgaard
69b37ad7cc dropbear: bump version
Fixes two security issues:

- The Dropbear server could be made to consume large amounts
of memory because decompressed packet sizes weren't checked.
Depending on the OS and hardware this might be a denial of
service.

- Valid users could be identified due to timing variations.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-10-04 16:54:40 +02:00
Alexandre Belloni
8dfd59d114 Normalize separator size to 80
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-06 22:30:24 +02:00
Thomas Petazzoni
a5ee03b252 dropbear: factorize the 'depends on BR2_PACKAGE_DROPBEAR'
Enclose all dropbear sub-options into a 'if BR2_PACKAGE_DROPBEAR'
... 'endif' block rather than having 'depends on BR2_PACKAGE_DROPBEAR'
for each option.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-05-27 13:10:26 +02:00
Gustavo Zacarias
494d5c9665 dropbear: disable standalone mode for nommu
dropbear for nommu targets must disable the standalone (non-inetd) mode
since the platform lacks fork(), fixes:
http://autobuild.buildroot.net/results/ecbdfab10f54bec75c112bbf005bba9ae2b18dc8/

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-05-07 16:30:30 +02:00
Gustavo Zacarias
9e5fcda1c5 dropbear: bump to version 2013.58
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-22 10:54:43 +02:00
Gustavo Zacarias
af2522c07b dropbear: bump to version 2013.57
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-17 21:43:46 +02:00
Gustavo Zacarias
83800fa259 dropbear: add vfork fix
Causes scp to fail badly.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-03 22:39:49 +02:00
Gustavo Zacarias
4593438650 dropbear: bump to version 2013.56
Switch ECHOs to SEDs to avoid issues with defines changing after
sysoptions.h was included - and it's cleaner.
Enable hmac-sha2-256 and hmac-sha2-512 support for the full featured.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-03-24 14:30:38 +01:00
Arnout Vandecappelle (Essensium/Mind)
c763412080 dropbear: add license info
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-11-14 22:32:35 +01:00
Arnout Vandecappelle (Essensium/Mind)
e1502ebc0c all packages: rename XXXTARGETS to xxx-package
Also remove the redundant $(call ...).

This is a purely mechanical change, performed with
find package linux toolchain boot -name \*.mk | \
  xargs sed -i -e 's/$(eval $(call GENTARGETS))/$(eval $(generic-package))/' \
               -e 's/$(eval $(call AUTOTARGETS))/$(eval $(autotools-package))/' \
               -e 's/$(eval $(call CMAKETARGETS))/$(eval $(cmake-package))/'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-17 20:23:05 +02:00
Luca Ceresoli
1a994d58af Remove stray $ character from a bunch of init scripts
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-03-15 22:11:25 +01:00
Peter Korsgaard
086bdfd378 dropbear: bump version, fixes CVE-2012-0920
From the release notes:

Security: Fix use-after-free bug that could be triggered if command="..."
authorized_keys restrictions are used.  Could allow arbitrary code
execution or bypass of the command="..." restriction to an authenticated
user.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-02-24 14:11:16 +01:00
Gustavo Zacarias
8b56bfe838 dropbear: bump to version 2011.54
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-11-11 21:42:26 +01:00
Will Moore
aeea387d82 dropbear: add options to disable wtmp / lastlog logging
Buildroot does not have wtmp or lastlog support by default so allow dropbear
to be configured to stop using them and hence to stop generating system log
error messages.

[Peter: invert to positive options, and disable by default]
Signed-off-by: Will Moore <will.moore@beraninstruments.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-10-26 11:24:30 +02:00
Thomas Petazzoni
300f9c9c9d package: remove useless arguments from AUTOTARGETS
Thanks to the pkgparentdir and pkgname functions, we can rewrite the
AUTOTARGETS macro in a way that avoids the need for each package to
repeat its name and the directory in which it is present.

[Peter: pkgdir->pkgparentdir]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-09-29 23:12:27 +02:00
Alexander Clouter
a7e78f974e dropbear: disable zlib support when built with small option
Closes #3733

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-05-16 22:41:54 +02:00
Peter Korsgaard
7fec8e8b75 dropbear: link statically if BR2_PREFER_STATIC_LIB
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-05-13 12:04:10 +02:00
Jean-Christophe PLAGNIOL-VILLARD
b8e52c47d7 dropbear: fix static link for version 0.53.1
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-05-13 12:00:35 +02:00
Peter Korsgaard
635b6a17dd dropbear: remove shared config.cache workaround
Now that the shared config.cache handling has been removed.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-05-12 21:41:53 +02:00
Gustavo Zacarias
baa8b69303 dropbear: bump to version 0.53.1
Changelog @ http://matt.ucc.asn.au/dropbear/CHANGES

Since some build-time defaults have changed that make dropbear somewhat
bigger we introduce a new option to optimize dropbear for size.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-03-05 15:37:16 +01:00
Peter Korsgaard
36a5ccd023 dropbear: really fix xauth tweak since dbcec2b2
Commit d5576fd2 tried to fix this, but introduced a new typo.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-10-06 09:45:12 +02:00
Peter Korsgaard
d5576fd2f0 dropbear: fix xauth tweak since dbcec2b2
The recent conversion to new-style hooks didn't actually enable the
xauth tweaking. Also rename to FIX_XAUTH as it just tweaks the path,
it doesn't disable anything.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-09-28 09:22:19 +02:00