--- /dev/null
+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;
+ }
+
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"
}
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
}
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
}