From 5073b4a0f58c1d703b8798ddadb881345dc2c8fd Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Sat, 7 Jun 2008 23:01:56 +0000 Subject: dropbear 0.50 update testing version (DEFAULT_PREFERENCE=-1) to 0.51. Consider commenting on bug #2506 --- packages/dropbear/dropbear-0.50/.mtn2git_empty | 0 packages/dropbear/dropbear-0.50/configure.patch | 27 ------------- packages/dropbear/dropbear-0.50/fix-2kb-keys.patch | 12 ------ .../urandom-xauth-changes-to-options.h.patch | 13 ------ packages/dropbear/dropbear-0.51/.mtn2git_empty | 0 packages/dropbear/dropbear-0.51/allow-nopw.patch | 40 +++++++++++++++++++ packages/dropbear/dropbear-0.51/configure.patch | 27 +++++++++++++ packages/dropbear/dropbear-0.51/fix-2kb-keys.patch | 12 ++++++ .../urandom-xauth-changes-to-options.h.patch | 13 ++++++ packages/dropbear/dropbear.inc | 46 +++++++++++----------- packages/dropbear/dropbear_0.50.bb | 6 --- packages/dropbear/dropbear_0.51.bb | 5 +++ 12 files changed, 121 insertions(+), 80 deletions(-) delete mode 100644 packages/dropbear/dropbear-0.50/.mtn2git_empty delete mode 100644 packages/dropbear/dropbear-0.50/configure.patch delete mode 100644 packages/dropbear/dropbear-0.50/fix-2kb-keys.patch delete mode 100644 packages/dropbear/dropbear-0.50/urandom-xauth-changes-to-options.h.patch create mode 100644 packages/dropbear/dropbear-0.51/.mtn2git_empty create mode 100644 packages/dropbear/dropbear-0.51/allow-nopw.patch create mode 100644 packages/dropbear/dropbear-0.51/configure.patch create mode 100644 packages/dropbear/dropbear-0.51/fix-2kb-keys.patch create mode 100644 packages/dropbear/dropbear-0.51/urandom-xauth-changes-to-options.h.patch delete mode 100644 packages/dropbear/dropbear_0.50.bb create mode 100644 packages/dropbear/dropbear_0.51.bb diff --git a/packages/dropbear/dropbear-0.50/.mtn2git_empty b/packages/dropbear/dropbear-0.50/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/dropbear/dropbear-0.50/configure.patch b/packages/dropbear/dropbear-0.50/configure.patch deleted file mode 100644 index fa24efc066..0000000000 --- a/packages/dropbear/dropbear-0.50/configure.patch +++ /dev/null @@ -1,27 +0,0 @@ -Index: dropbear-0.50/configure.in -=================================================================== ---- dropbear-0.50.orig/configure.in -+++ dropbear-0.50/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/packages/dropbear/dropbear-0.50/fix-2kb-keys.patch b/packages/dropbear/dropbear-0.50/fix-2kb-keys.patch deleted file mode 100644 index bb7a4d32ac..0000000000 --- a/packages/dropbear/dropbear-0.50/fix-2kb-keys.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: dropbear-0.50/kex.h -=================================================================== ---- dropbear-0.50.orig/kex.h -+++ dropbear-0.50/kex.h -@@ -59,6 +59,6 @@ struct KEXState { - - }; - --#define MAX_KEXHASHBUF 2000 -+#define MAX_KEXHASHBUF 3000 - - #endif /* _KEX_H_ */ diff --git a/packages/dropbear/dropbear-0.50/urandom-xauth-changes-to-options.h.patch b/packages/dropbear/dropbear-0.50/urandom-xauth-changes-to-options.h.patch deleted file mode 100644 index 787b801643..0000000000 --- a/packages/dropbear/dropbear-0.50/urandom-xauth-changes-to-options.h.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: dropbear-0.50/options.h -=================================================================== ---- dropbear-0.50.orig/options.h -+++ dropbear-0.50/options.h -@@ -197,7 +197,7 @@ etc) slower (perhaps by 50%). Recommende - /* The command to invoke for xauth when using X11 forwarding. - * "-q" for quiet */ - #ifndef XAUTH_COMMAND --#define XAUTH_COMMAND "/usr/X11R6/bin/xauth -q" -+#define XAUTH_COMMAND "xauth -q" - #endif - - /* if you want to enable running an sftp server (such as the one included with diff --git a/packages/dropbear/dropbear-0.51/.mtn2git_empty b/packages/dropbear/dropbear-0.51/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/dropbear/dropbear-0.51/allow-nopw.patch b/packages/dropbear/dropbear-0.51/allow-nopw.patch new file mode 100644 index 0000000000..3f3e8b167f --- /dev/null +++ b/packages/dropbear/dropbear-0.51/allow-nopw.patch @@ -0,0 +1,40 @@ +Index: dropbear-0.51/svr-auth.c +=================================================================== +--- dropbear-0.51.orig/svr-auth.c ++++ dropbear-0.51/svr-auth.c +@@ -270,7 +270,7 @@ static int checkusername(unsigned char * + send_msg_userauth_failure(0, 1); + return DROPBEAR_FAILURE; + } +- ++#ifdef DISALLOW_EMPTY_PW + /* check for an empty password */ + if (ses.authstate.pw_passwd[0] == '\0') { + TRACE(("leave checkusername: empty pword")) +@@ -279,7 +279,7 @@ static int checkusername(unsigned char * + send_msg_userauth_failure(0, 1); + return DROPBEAR_FAILURE; + } +- ++#endif + TRACE(("shell is %s", ses.authstate.pw_shell)) + + /* check that the shell is set */ +Index: dropbear-0.51/svr-authpasswd.c +=================================================================== +--- dropbear-0.51.orig/svr-authpasswd.c ++++ dropbear-0.51/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_PW + 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; + } + diff --git a/packages/dropbear/dropbear-0.51/configure.patch b/packages/dropbear/dropbear-0.51/configure.patch new file mode 100644 index 0000000000..fa24efc066 --- /dev/null +++ b/packages/dropbear/dropbear-0.51/configure.patch @@ -0,0 +1,27 @@ +Index: dropbear-0.50/configure.in +=================================================================== +--- dropbear-0.50.orig/configure.in ++++ dropbear-0.50/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/packages/dropbear/dropbear-0.51/fix-2kb-keys.patch b/packages/dropbear/dropbear-0.51/fix-2kb-keys.patch new file mode 100644 index 0000000000..bb7a4d32ac --- /dev/null +++ b/packages/dropbear/dropbear-0.51/fix-2kb-keys.patch @@ -0,0 +1,12 @@ +Index: dropbear-0.50/kex.h +=================================================================== +--- dropbear-0.50.orig/kex.h ++++ dropbear-0.50/kex.h +@@ -59,6 +59,6 @@ struct KEXState { + + }; + +-#define MAX_KEXHASHBUF 2000 ++#define MAX_KEXHASHBUF 3000 + + #endif /* _KEX_H_ */ diff --git a/packages/dropbear/dropbear-0.51/urandom-xauth-changes-to-options.h.patch b/packages/dropbear/dropbear-0.51/urandom-xauth-changes-to-options.h.patch new file mode 100644 index 0000000000..787b801643 --- /dev/null +++ b/packages/dropbear/dropbear-0.51/urandom-xauth-changes-to-options.h.patch @@ -0,0 +1,13 @@ +Index: dropbear-0.50/options.h +=================================================================== +--- dropbear-0.50.orig/options.h ++++ dropbear-0.50/options.h +@@ -197,7 +197,7 @@ etc) slower (perhaps by 50%). Recommende + /* The command to invoke for xauth when using X11 forwarding. + * "-q" for quiet */ + #ifndef XAUTH_COMMAND +-#define XAUTH_COMMAND "/usr/X11R6/bin/xauth -q" ++#define XAUTH_COMMAND "xauth -q" + #endif + + /* if you want to enable running an sftp server (such as the one included with diff --git a/packages/dropbear/dropbear.inc b/packages/dropbear/dropbear.inc index ebe0c1ea9c..31edd26cc8 100644 --- a/packages/dropbear/dropbear.inc +++ b/packages/dropbear/dropbear.inc @@ -6,19 +6,21 @@ DEPENDS = "zlib" PROVIDES = "ssh sshd" RPROVIDES = "ssh sshd" -SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.gz \ - file://urandom-xauth-changes-to-options.h.patch;patch=1 \ - file://configure.patch;patch=1 \ - file://fix-2kb-keys.patch;patch=1 \ - file://allow-nopw.patch \ - file://init" +SRC_URI = "\ + http://matt.ucc.asn.au/dropbear/dropbear-${PV}.tar.bz2 \ + file://urandom-xauth-changes-to-options.h.patch;patch=1 \ + file://configure.patch;patch=1 \ + file://fix-2kb-keys.patch;patch=1 \ + file://allow-nopw.patch \ + file://init \ +" inherit autotools update-rc.d INITSCRIPT_NAME = "dropbear" INITSCRIPT_PARAMS = "defaults 10" -CFLAGS_prepend = " -I. " +CFLAGS =+ "-I." LD = "${CC}" SBINCOMMANDS = "dropbear dropbearkey dropbearconvert" @@ -33,13 +35,13 @@ do_configure_prepend() { } do_install() { - install -d ${D}${sysconfdir} \ - ${D}${sysconfdir}/init.d \ - ${D}${sysconfdir}/default \ - ${D}${sysconfdir}/dropbear \ - ${D}${bindir} \ - ${D}${sbindir} \ - ${D}${localstatedir} + install -d ${D}${sysconfdir} + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/default + install -d ${D}${sysconfdir}/dropbear + install -d ${D}${bindir} + install -d ${D}${sbindir} + install -d ${D}${localstatedir} install -m 0755 dropbearmulti ${D}${sbindir}/ ln -s ${sbindir}/dropbearmulti ${D}${bindir}/dbclient @@ -62,12 +64,12 @@ pkg_postinst () { } pkg_postrm_append () { - if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then - rm ${sysconfdir}/dropbear/dropbear_rsa_host_key - fi - if [ -f "${sysconfdir}/dropbear/dropbear_dss_host_key" ]; then - rm ${sysconfdir}/dropbear/dropbear_dss_host_key - fi - update-alternatives --remove ssh ${bindir}/dropbearmulti - update-alternatives --remove scp ${bindir}/dropbearmulti + if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then + rm ${sysconfdir}/dropbear/dropbear_rsa_host_key + fi + if [ -f "${sysconfdir}/dropbear/dropbear_dss_host_key" ]; then + rm ${sysconfdir}/dropbear/dropbear_dss_host_key + fi + update-alternatives --remove ssh ${bindir}/dropbearmulti + update-alternatives --remove scp ${bindir}/dropbearmulti } diff --git a/packages/dropbear/dropbear_0.50.bb b/packages/dropbear/dropbear_0.50.bb deleted file mode 100644 index bd8f31cff6..0000000000 --- a/packages/dropbear/dropbear_0.50.bb +++ /dev/null @@ -1,6 +0,0 @@ -require dropbear.inc - -PR = "r1" - -# testing -DEFAULT_PREFERENCE = "-1" diff --git a/packages/dropbear/dropbear_0.51.bb b/packages/dropbear/dropbear_0.51.bb new file mode 100644 index 0000000000..ab57921eed --- /dev/null +++ b/packages/dropbear/dropbear_0.51.bb @@ -0,0 +1,5 @@ +require dropbear.inc +PR = "r0" + +# testing +DEFAULT_PREFERENCE = "-1" -- cgit v1.2.3