-diff -u -r ../dropbear-2017.75/options.h ./options.h
---- ../dropbear-2017.75/options.h 2017-05-18 16:47:02.000000000 +0200
-+++ ./options.h 2018-01-24 11:01:37.013064455 +0100
-@@ -11,7 +11,7 @@
- /* IMPORTANT: Many options will require "make clean" after changes */
+diff -uNr dropbear-2018.76/default_options.h dropbear-2018.76.mod/default_options.h
+--- dropbear-2018.76/default_options.h 2018-02-27 16:25:10.000000000 +0200
++++ dropbear-2018.76.mod/default_options.h 2018-04-21 13:44:59.120396918 +0300
+@@ -13,15 +13,15 @@
+
+ IMPORTANT: Some options will require "make clean" after changes */
- #ifndef DROPBEAR_DEFPORT
-#define DROPBEAR_DEFPORT "22"
+#define DROPBEAR_DEFPORT "8022"
- #endif
- #ifndef DROPBEAR_DEFADDRESS
-@@ -21,13 +21,13 @@
+ /* Listen on all interfaces */
+ #define DROPBEAR_DEFADDRESS ""
/* Default hostkey paths - these can be specified on the command line */
- #ifndef DSS_PRIV_FILENAME
-#define DSS_PRIV_FILENAME "/etc/dropbear/dropbear_dss_host_key"
-+#define DSS_PRIV_FILENAME "@TERMUX_PREFIX@/etc/dropbear/dropbear_dss_host_key"
- #endif
- #ifndef RSA_PRIV_FILENAME
-#define RSA_PRIV_FILENAME "/etc/dropbear/dropbear_rsa_host_key"
-+#define RSA_PRIV_FILENAME "@TERMUX_PREFIX@/etc/dropbear/dropbear_rsa_host_key"
- #endif
- #ifndef ECDSA_PRIV_FILENAME
-#define ECDSA_PRIV_FILENAME "/etc/dropbear/dropbear_ecdsa_host_key"
++#define DSS_PRIV_FILENAME "@TERMUX_PREFIX@/etc/dropbear/dropbear_dss_host_key"
++#define RSA_PRIV_FILENAME "@TERMUX_PREFIX@/etc/dropbear/dropbear_rsa_host_key"
+#define ECDSA_PRIV_FILENAME "@TERMUX_PREFIX@/etc/dropbear/dropbear_ecdsa_host_key"
- #endif
/* Set NON_INETD_MODE if you require daemon functionality (ie Dropbear listens
-@@ -52,7 +52,7 @@
- several kB in binary size however will make the symmetrical ciphers and hashes
- slower, perhaps by 50%. Recommended for small systems that aren't doing
- much traffic. */
--#define DROPBEAR_SMALL_CODE
+ * on chosen ports and keeps accepting connections. This is the default.
+@@ -44,7 +44,7 @@
+ * several kB in binary size however will make the symmetrical ciphers and hashes
+ * slower, perhaps by 50%. Recommended for small systems that aren't doing
+ * much traffic. */
+-#define DROPBEAR_SMALL_CODE 1
+#undef DROPBEAR_SMALL_CODE
/* Enable X11 Forwarding - server only */
- #define ENABLE_X11FWD
-@@ -198,7 +198,7 @@
+ #define DROPBEAR_X11FWD 1
+@@ -175,11 +175,11 @@
- /* The MOTD file path */
- #ifndef MOTD_FILENAME
+ /* Whether to print the message of the day (MOTD). */
+ #define DO_MOTD 0
-#define MOTD_FILENAME "/etc/motd"
+#define MOTD_FILENAME "@TERMUX_PREFIX@/etc/motd"
- #endif
/* Authentication Types - at least one required.
-@@ -213,7 +213,7 @@
-
- /* This requires crypt() */
- #ifdef HAVE_CRYPT
--#define ENABLE_SVR_PASSWORD_AUTH
-+#undef ENABLE_SVR_PASSWORD_AUTH
- #endif
- /* PAM requires ./configure --enable-pam */
- /*#define ENABLE_SVR_PAM_AUTH */
-@@ -287,25 +287,25 @@
+ RFC Draft requires pubkey auth, and recommends password */
+-#define DROPBEAR_SVR_PASSWORD_AUTH 1
++#undef DROPBEAR_SVR_PASSWORD_AUTH
+
+ /* Note: PAM auth is quite simple and only works for PAM modules which just do
+ * a simple "Login: " "Password: " (you can edit the strings in svr-authpam.c).
+@@ -222,7 +222,7 @@
+
+ /* Set this to use PRNGD or EGD instead of /dev/urandom */
+ #define DROPBEAR_USE_PRNGD 0
+-#define DROPBEAR_PRNGD_SOCKET "/var/run/dropbear-rng"
++#define DROPBEAR_PRNGD_SOCKET "@TERMUX_PREFIX@/var/run/dropbear-rng"
+
+ /* Specify the number of clients we will allow to be connected but
+ * not yet authenticated. After this limit, connections are rejected */
+@@ -239,22 +239,22 @@
+
/* The default file to store the daemon's process ID, for shutdown
scripts etc. This can be overridden with the -P flag */
- #ifndef DROPBEAR_PIDFILE
-#define DROPBEAR_PIDFILE "/var/run/dropbear.pid"
+#define DROPBEAR_PIDFILE "@TERMUX_PREFIX@/var/run/dropbear.pid"
- #endif
/* The command to invoke for xauth when using X11 forwarding.
* "-q" for quiet */
- #ifndef XAUTH_COMMAND
-#define XAUTH_COMMAND "/usr/bin/xauth -q"
+#define XAUTH_COMMAND "@TERMUX_PREFIX@/bin/xauth -q"
- #endif
+
/* if you want to enable running an sftp server (such as the one included with
- * OpenSSH), set the path below. If the path isn't defined, sftp will not
- * be enabled */
- #ifndef SFTPSERVER_PATH
+ * OpenSSH), set the path below and set DROPBEAR_SFTPSERVER.
+ * The sftp-server program is not provided by Dropbear itself */
+ #define DROPBEAR_SFTPSERVER 1
-#define SFTPSERVER_PATH "/usr/libexec/sftp-server"
+#define SFTPSERVER_PATH "@TERMUX_PREFIX@/libexec/sftp-server"
- #endif
/* This is used by the scp binary when used as a client binary. If you're
* not using the Dropbear client, you'll need to change it */
/* Whether to log commands executed by a client. This only logs the
* (single) command sent to the server, not what a user did in a
-@@ -347,7 +347,7 @@
+@@ -290,6 +290,6 @@
#define DEFAULT_IDLE_TIMEOUT 0
/* The default path. This will often get replaced by the shell */
-#define DEFAULT_PATH "/usr/bin:/bin"
-+#define DEFAULT_PATH "@TERMUX_PREFIX@/bin"
++#define DEFAULT_PATH "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets"
- /* Some other defines (that mostly should be left alone) are defined
- * in sysoptions.h */
+ #endif /* DROPBEAR_DEFAULT_OPTIONS_H_ */