Skip to content

Commit

Permalink
fix(main/dropbear): don't handle motd internally
Browse files Browse the repository at this point in the history
MOTD will be shown by Termux login utility.

Fixes termux/termux-packages#16684
  • Loading branch information
termux-pacman-bot committed May 28, 2023
1 parent 3f3f560 commit 395bb21
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions packages/dropbear/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Small SSH server and client"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2022.83
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://matt.ucc.asn.au/dropbear/releases/dropbear-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=bc5a121ffbc94b5171ad5ebe01be42746d50aa797c9549a4639894a16749443b
TERMUX_PKG_DEPENDS="termux-auth, zlib"
Expand Down
23 changes: 13 additions & 10 deletions packages/dropbear/default_options.h.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
--- a/default_options.h
+++ b/default_options.h
diff -uNr dropbear-2022.83/default_options.h dropbear-2022.83.mod/default_options.h
--- dropbear-2022.83/default_options.h 2022-11-14 16:30:00.000000000 +0200
+++ dropbear-2022.83.mod/default_options.h 2023-05-22 23:19:08.878747850 +0300
@@ -13,7 +13,7 @@

IMPORTANT: Some options will require "make clean" after changes */
Expand All @@ -24,7 +25,7 @@

/* Set NON_INETD_MODE if you require daemon functionality (ie Dropbear listens
* on chosen ports and keeps accepting connections. This is the default.
@@ -45,7 +45,7 @@
@@ -57,7 +57,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. */
Expand All @@ -33,16 +34,18 @@

/* Enable X11 Forwarding - server only */
#define DROPBEAR_X11FWD 0
@@ -189,7 +189,7 @@
@@ -218,8 +218,8 @@
#define DO_HOST_LOOKUP 0

/* Whether to print the message of the day (MOTD). */
#define DO_MOTD 1
-#define DO_MOTD 1
-#define MOTD_FILENAME "/etc/motd"
+#define DO_MOTD 0
+#define MOTD_FILENAME "@TERMUX_PREFIX@/etc/motd"

/* Authentication Types - at least one required.
RFC Draft requires pubkey auth, and recommends password */
@@ -213,7 +213,7 @@
@@ -244,7 +244,7 @@
/* Set this to 0 if your system does not have multiple user support.
(Linux kernel CONFIG_MULTIUSER option)
The resulting binary will not run on a normal system. */
Expand All @@ -51,7 +54,7 @@

/* Client authentication options */
#define DROPBEAR_CLI_PASSWORD_AUTH 1
@@ -241,7 +241,7 @@
@@ -273,7 +273,7 @@

/* Set this to use PRNGD or EGD instead of /dev/urandom */
#define DROPBEAR_USE_PRNGD 0
Expand All @@ -60,7 +63,7 @@

/* Specify the number of clients we will allow to be connected but
* not yet authenticated. After this limit, connections are rejected */
@@ -285,11 +285,11 @@
@@ -298,11 +298,11 @@
* scripts etc. This can be overridden with the -P flag.
* Homedir is prepended if path begins with ~/
*/
Expand All @@ -74,7 +77,7 @@


/* If you want to enable running an sftp server (such as the one included with
@@ -298,11 +298,11 @@
@@ -311,11 +311,11 @@
* Homedir is prepended if path begins with ~/
*/
#define DROPBEAR_SFTPSERVER 1
Expand All @@ -88,7 +91,7 @@

/* 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
@@ -338,7 +338,7 @@
@@ -351,7 +351,7 @@
#define DEFAULT_IDLE_TIMEOUT 0

/* The default path. This will often get replaced by the shell */
Expand Down

0 comments on commit 395bb21

Please sign in to comment.