From e876096fcbb42039d568a7acbc506e4099e9a443 Mon Sep 17 00:00:00 2001 From: Mei Lei Date: Wed, 7 Dec 2011 23:15:29 +0800 Subject: dropbear: Upgrade from 0.53.1 to 2011.54 This new version added ALLOW_BLANK_PASSWORD option. So change the allow-nopw.patch content to enable this function. Signed-off-by: Mei Lei --- .../dropbear/dropbear-0.53.1/configure.patch | 29 ------------ .../dropbear/dropbear-2011.54/configure.patch | 29 ++++++++++++ .../dropbear/dropbear/allow-nopw.patch | 55 +++++++--------------- meta/recipes-core/dropbear/dropbear_0.53.1.bb | 6 --- meta/recipes-core/dropbear/dropbear_2011.54.bb | 6 +++ 5 files changed, 52 insertions(+), 73 deletions(-) delete mode 100644 meta/recipes-core/dropbear/dropbear-0.53.1/configure.patch create mode 100644 meta/recipes-core/dropbear/dropbear-2011.54/configure.patch delete mode 100644 meta/recipes-core/dropbear/dropbear_0.53.1.bb create mode 100644 meta/recipes-core/dropbear/dropbear_2011.54.bb (limited to 'meta/recipes-core/dropbear') diff --git a/meta/recipes-core/dropbear/dropbear-0.53.1/configure.patch b/meta/recipes-core/dropbear/dropbear-0.53.1/configure.patch deleted file mode 100644 index aeb7c0a4ac..0000000000 --- a/meta/recipes-core/dropbear/dropbear-0.53.1/configure.patch +++ /dev/null @@ -1,29 +0,0 @@ -Upstream-Status: Pending - -Index: dropbear-0.49/configure.in -=================================================================== ---- dropbear-0.49.orig/configure.in -+++ dropbear-0.49/configure.in -@@ -164,14 +164,20 @@ AC_ARG_ENABLE(openpty, - AC_MSG_NOTICE(Not using openpty) - else - AC_MSG_NOTICE(Using openpty if available) -- AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY,,Have openpty() function)]) -+ AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes]) - fi - ], - [ - AC_MSG_NOTICE(Using openpty if available) -- AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY)]) -+ AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes]) - ] - ) -+ -+if test "x$dropbear_cv_func_have_openpty" = "xyes"; then -+ AC_DEFINE(HAVE_OPENPTY,,Have openpty() function) -+ no_ptc_check=yes -+ no_ptmx_check=yes -+fi - - - AC_ARG_ENABLE(syslog, diff --git a/meta/recipes-core/dropbear/dropbear-2011.54/configure.patch b/meta/recipes-core/dropbear/dropbear-2011.54/configure.patch new file mode 100644 index 0000000000..aeb7c0a4ac --- /dev/null +++ b/meta/recipes-core/dropbear/dropbear-2011.54/configure.patch @@ -0,0 +1,29 @@ +Upstream-Status: Pending + +Index: dropbear-0.49/configure.in +=================================================================== +--- dropbear-0.49.orig/configure.in ++++ dropbear-0.49/configure.in +@@ -164,14 +164,20 @@ AC_ARG_ENABLE(openpty, + AC_MSG_NOTICE(Not using openpty) + else + AC_MSG_NOTICE(Using openpty if available) +- AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY,,Have openpty() function)]) ++ AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes]) + fi + ], + [ + AC_MSG_NOTICE(Using openpty if available) +- AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY)]) ++ AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes]) + ] + ) ++ ++if test "x$dropbear_cv_func_have_openpty" = "xyes"; then ++ AC_DEFINE(HAVE_OPENPTY,,Have openpty() function) ++ no_ptc_check=yes ++ no_ptmx_check=yes ++fi + + + AC_ARG_ENABLE(syslog, diff --git a/meta/recipes-core/dropbear/dropbear/allow-nopw.patch b/meta/recipes-core/dropbear/dropbear/allow-nopw.patch index 3909ef26e7..a175ee14da 100644 --- a/meta/recipes-core/dropbear/dropbear/allow-nopw.patch +++ b/meta/recipes-core/dropbear/dropbear/allow-nopw.patch @@ -1,40 +1,19 @@ -Upstream-Status: Inappropriate [embedded specific] +Enable blank password login function for new release dropbear. -diff --git a/svr-auth.c b/svr-auth.c -index 87e3c5e..3e78c1a 100644 ---- a/svr-auth.c -+++ b/svr-auth.c -@@ -250,6 +250,7 @@ static int checkusername(unsigned char *username, unsigned int userlen) { - } - - /* check for an empty password */ -+#ifdef DISALLOW_EMPTY_PW - if (ses.authstate.pw_passwd[0] == '\0') { - TRACE(("leave checkusername: empty pword")) - dropbear_log(LOG_WARNING, "User '%s' has blank password, rejected", -@@ -257,6 +258,7 @@ static int checkusername(unsigned char *username, unsigned int userlen) { - send_msg_userauth_failure(0, 1); - return DROPBEAR_FAILURE; - } -+#endif - - TRACE(("shell is %s", ses.authstate.pw_shell)) - -diff --git a/svr-authpasswd.c b/svr-authpasswd.c -index a29fd63..6a3c7e9 100644 ---- a/svr-authpasswd.c -+++ b/svr-authpasswd.c -@@ -64,9 +64,13 @@ void svr_auth_password() { - * since the shadow password may differ to that tested - * in auth.c */ - if (passwdcrypt[0] == '\0') { -+#ifdef DISALLOW_EMPTY_PASSWD - dropbear_log(LOG_WARNING, "User '%s' has blank password, rejected", - ses.authstate.pw_name); - send_msg_userauth_failure(0, 1); -+#else -+ send_msg_userauth_success(); -+#endif - return; - } +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Mei Lei + +diff --git a/options.h b/options.h +index 73689ad..041ddaa 100644 +--- a/options.h ++++ b/options.h +@@ -180,7 +180,7 @@ much traffic. */ + * Public key logins are allowed for blank-password accounts regardless of this + * setting. PAM is not affected by this setting, it uses the normal pam.d + * settings ('nullok' option) */ +-/* #define ALLOW_BLANK_PASSWORD */ ++#define ALLOW_BLANK_PASSWORD + #define ENABLE_CLI_PASSWORD_AUTH + #define ENABLE_CLI_PUBKEY_AUTH diff --git a/meta/recipes-core/dropbear/dropbear_0.53.1.bb b/meta/recipes-core/dropbear/dropbear_0.53.1.bb deleted file mode 100644 index 54f86e80e0..0000000000 --- a/meta/recipes-core/dropbear/dropbear_0.53.1.bb +++ /dev/null @@ -1,6 +0,0 @@ -require dropbear.inc - -SRC_URI[md5sum] = "6b8d901859d9b8a18e2f6bfe0a892a03" -SRC_URI[sha256sum] = "192538ca2a9ee778f12a2e8ddb6f098fa85dcb6457adc1cb40dd94b3c28f4df6" - -PR = "r0" diff --git a/meta/recipes-core/dropbear/dropbear_2011.54.bb b/meta/recipes-core/dropbear/dropbear_2011.54.bb new file mode 100644 index 0000000000..b7b4b83e89 --- /dev/null +++ b/meta/recipes-core/dropbear/dropbear_2011.54.bb @@ -0,0 +1,6 @@ +require dropbear.inc + +SRC_URI[md5sum] = "ce1e236c4a8df0cb95253defee6716b5" +SRC_URI[sha256sum] = "a5fe60fa9c11e7b0f6a21ef6e86a53ce3d55236548901905070ff1c1716fbf47" + +PR = "r0" -- cgit 1.2.3-korg