dropbear 0.50 update testing version (DEFAULT_PREFERENCE=-1) to 0.51. Consider commen...
authorMichael Lauer <mickey@vanille-media.de>
Sat, 7 Jun 2008 23:01:56 +0000 (23:01 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Sat, 7 Jun 2008 23:01:56 +0000 (23:01 +0000)
packages/dropbear/dropbear-0.51/.mtn2git_empty [moved from packages/dropbear/dropbear-0.50/.mtn2git_empty with 100% similarity]
packages/dropbear/dropbear-0.51/allow-nopw.patch [new file with mode: 0644]
packages/dropbear/dropbear-0.51/configure.patch [moved from packages/dropbear/dropbear-0.50/configure.patch with 100% similarity]
packages/dropbear/dropbear-0.51/fix-2kb-keys.patch [moved from packages/dropbear/dropbear-0.50/fix-2kb-keys.patch with 100% similarity]
packages/dropbear/dropbear-0.51/urandom-xauth-changes-to-options.h.patch [moved from packages/dropbear/dropbear-0.50/urandom-xauth-changes-to-options.h.patch with 100% similarity]
packages/dropbear/dropbear.inc
packages/dropbear/dropbear_0.51.bb [moved from packages/dropbear/dropbear_0.50.bb with 84% similarity]

diff --git a/packages/dropbear/dropbear-0.51/allow-nopw.patch b/packages/dropbear/dropbear-0.51/allow-nopw.patch
new file mode 100644 (file)
index 0000000..3f3e8b1
--- /dev/null
@@ -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;
+       }
index ebe0c1e..31edd26 100644 (file)
@@ -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
 }
similarity index 84%
rename from packages/dropbear/dropbear_0.50.bb
rename to packages/dropbear/dropbear_0.51.bb
index bd8f31c..ab57921 100644 (file)
@@ -1,6 +1,5 @@
 require dropbear.inc
-
-PR = "r1"
+PR = "r0"
 
 # testing
 DEFAULT_PREFERENCE = "-1"