diff mbox series

[1/1] package/dropbear: add optional dependency to libxcrypt

Message ID 20240405153622.3348696-1-bernd@kuhls.net
State Accepted
Headers show
Series [1/1] package/dropbear: add optional dependency to libxcrypt | expand

Commit Message

Bernd Kuhls April 5, 2024, 3:36 p.m. UTC
When glibc was bumped to version 2.39 in commit
b5680f53d60acf8ff6010082f873438a39bd5d97 it removed the deprecated
libcrypt support.

Due to this removal dropbear was unable to accept connections using
password authentication.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
My knowledge about the internals of dropbear is non-existent but adding
libxcrypt fixed the connection problem which occured right after the
glibc bump.

 package/dropbear/Config.in   | 1 +
 package/dropbear/dropbear.mk | 4 ++++
 2 files changed, 5 insertions(+)

Comments

James Hilliard April 5, 2024, 4:28 p.m. UTC | #1
On Fri, Apr 5, 2024 at 9:36 AM Bernd Kuhls <bernd@kuhls.net> wrote:
>
> When glibc was bumped to version 2.39 in commit
> b5680f53d60acf8ff6010082f873438a39bd5d97 it removed the deprecated
> libcrypt support.
>
> Due to this removal dropbear was unable to accept connections using
> password authentication.
>
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Tested-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> My knowledge about the internals of dropbear is non-existent but adding
> libxcrypt fixed the connection problem which occured right after the
> glibc bump.
>
>  package/dropbear/Config.in   | 1 +
>  package/dropbear/dropbear.mk | 4 ++++
>  2 files changed, 5 insertions(+)
>
> diff --git a/package/dropbear/Config.in b/package/dropbear/Config.in
> index e14a670c19..6a9161d659 100644
> --- a/package/dropbear/Config.in
> +++ b/package/dropbear/Config.in
> @@ -2,6 +2,7 @@ config BR2_PACKAGE_DROPBEAR
>         bool "dropbear"
>         select BR2_PACKAGE_ZLIB if !BR2_PACKAGE_DROPBEAR_SMALL
>         select BR2_PACKAGE_LIBTOMCRYPT if !BR2_PACKAGE_DROPBEAR_SMALL
> +       select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
>         help
>           A small SSH 2 server designed for small memory environments.
>
> diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk
> index 7ac8a38559..56f565e016 100644
> --- a/package/dropbear/dropbear.mk
> +++ b/package/dropbear/dropbear.mk
> @@ -39,6 +39,10 @@ ifeq ($(BR2_SHARED_STATIC_LIBS),y)
>  DROPBEAR_CONF_OPTS += --disable-static
>  endif
>
> +ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
> +DROPBEAR_DEPENDENCIES += libxcrypt
> +endif
> +
>  ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
>  define DROPBEAR_SVR_PAM_AUTH
>         echo '#define DROPBEAR_SVR_PASSWORD_AUTH 0'     >> $(@D)/localoptions.h
> --
> 2.39.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN April 7, 2024, 8:50 a.m. UTC | #2
Bernd, All,

On 2024-04-05 17:36 +0200, Bernd Kuhls spake thusly:
> When glibc was bumped to version 2.39 in commit
> b5680f53d60acf8ff6010082f873438a39bd5d97 it removed the deprecated
> libcrypt support.
> 
> Due to this removal dropbear was unable to accept connections using
> password authentication.
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
> My knowledge about the internals of dropbear is non-existent but adding
> libxcrypt fixed the connection problem which occured right after the
> glibc bump.
> 
>  package/dropbear/Config.in   | 1 +
>  package/dropbear/dropbear.mk | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/package/dropbear/Config.in b/package/dropbear/Config.in
> index e14a670c19..6a9161d659 100644
> --- a/package/dropbear/Config.in
> +++ b/package/dropbear/Config.in
> @@ -2,6 +2,7 @@ config BR2_PACKAGE_DROPBEAR
>  	bool "dropbear"
>  	select BR2_PACKAGE_ZLIB if !BR2_PACKAGE_DROPBEAR_SMALL
>  	select BR2_PACKAGE_LIBTOMCRYPT if !BR2_PACKAGE_DROPBEAR_SMALL
> +	select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
>  	help
>  	  A small SSH 2 server designed for small memory environments.
>  
> diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk
> index 7ac8a38559..56f565e016 100644
> --- a/package/dropbear/dropbear.mk
> +++ b/package/dropbear/dropbear.mk
> @@ -39,6 +39,10 @@ ifeq ($(BR2_SHARED_STATIC_LIBS),y)
>  DROPBEAR_CONF_OPTS += --disable-static
>  endif
>  
> +ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
> +DROPBEAR_DEPENDENCIES += libxcrypt
> +endif
> +
>  ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
>  define DROPBEAR_SVR_PAM_AUTH
>  	echo '#define DROPBEAR_SVR_PASSWORD_AUTH 0'     >> $(@D)/localoptions.h
> -- 
> 2.39.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/dropbear/Config.in b/package/dropbear/Config.in
index e14a670c19..6a9161d659 100644
--- a/package/dropbear/Config.in
+++ b/package/dropbear/Config.in
@@ -2,6 +2,7 @@  config BR2_PACKAGE_DROPBEAR
 	bool "dropbear"
 	select BR2_PACKAGE_ZLIB if !BR2_PACKAGE_DROPBEAR_SMALL
 	select BR2_PACKAGE_LIBTOMCRYPT if !BR2_PACKAGE_DROPBEAR_SMALL
+	select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
 	help
 	  A small SSH 2 server designed for small memory environments.
 
diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk
index 7ac8a38559..56f565e016 100644
--- a/package/dropbear/dropbear.mk
+++ b/package/dropbear/dropbear.mk
@@ -39,6 +39,10 @@  ifeq ($(BR2_SHARED_STATIC_LIBS),y)
 DROPBEAR_CONF_OPTS += --disable-static
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
+DROPBEAR_DEPENDENCIES += libxcrypt
+endif
+
 ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
 define DROPBEAR_SVR_PAM_AUTH
 	echo '#define DROPBEAR_SVR_PASSWORD_AUTH 0'     >> $(@D)/localoptions.h