summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2020-09-17 22:17:05 -1000
committerSam Bingner <sam@bingner.com>2020-09-17 22:17:05 -1000
commit5cd1e5648e3f10c4307d4f24cf2f2bbe5be7dfe7 (patch)
tree2be102f664a862bc6248d253d0fc6acd3236c9e6
parent3f451419e1069c63a39a8e15d12b2c7f623ef49f (diff)
Dropbear files
-rw-r--r--data/dropbear_/default_path.diff32
-rw-r--r--data/dropbear_/dropbear-2019.78.tar.bz2bin0 -> 2708659 bytes
-rw-r--r--data/dropbear_/make.sh11
-rw-r--r--data/dropbear_/shell.diff54
-rw-r--r--data/dropbear_/utmpx.diff11
5 files changed, 108 insertions, 0 deletions
diff --git a/data/dropbear_/default_path.diff b/data/dropbear_/default_path.diff
new file mode 100644
index 000000000..a92f60f1b
--- /dev/null
+++ b/data/dropbear_/default_path.diff
@@ -0,0 +1,32 @@
+diff -ur dropbear-2019.78/Makefile.in dropbear-2019.78+iOS/Makefile.in
+--- dropbear-2019.78/Makefile.in 2019-03-27 04:15:23.000000000 -1000
++++ dropbear-2019.78+iOS/Makefile.in 2019-11-10 07:42:23.000000000 -1000
+@@ -9,7 +9,7 @@
+ # dbclient functionality, and includes the progress-bar functionality in scp.
+
+ ifndef PROGRAMS
+- PROGRAMS=dropbear dbclient dropbearkey dropbearconvert
++ PROGRAMS=dropbear dbclient dropbearkey dropbearconvert scp
+ endif
+
+ STATIC_LTC=libtomcrypt/libtomcrypt.a
+diff -ur dropbear-2019.78/default_options.h dropbear-2019.78+iOS/default_options.h
+--- dropbear-2019.78/default_options.h 2019-03-27 04:15:23.000000000 -1000
++++ dropbear-2019.78+iOS/default_options.h 2019-11-09 23:13:07.000000000 -1000
+@@ -259,7 +259,7 @@
+
+ /* 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 */
+-#define DROPBEAR_PATH_SSH_PROGRAM "/usr/bin/dbclient"
++#define DROPBEAR_PATH_SSH_PROGRAM "/binpack/usr/bin/dbclient"
+
+ /* 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
+@@ -295,6 +295,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 "/binpack/usr/bin:/binpack/usr/sbin:/binpack/bin:/binpack/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
+
+ #endif /* DROPBEAR_DEFAULT_OPTIONS_H_ */
diff --git a/data/dropbear_/dropbear-2019.78.tar.bz2 b/data/dropbear_/dropbear-2019.78.tar.bz2
new file mode 100644
index 000000000..5d0ff2654
--- /dev/null
+++ b/data/dropbear_/dropbear-2019.78.tar.bz2
Binary files differ
diff --git a/data/dropbear_/make.sh b/data/dropbear_/make.sh
new file mode 100644
index 000000000..e25e10f03
--- /dev/null
+++ b/data/dropbear_/make.sh
@@ -0,0 +1,11 @@
+pkg:setup
+pkg:configure --prefix=/binpack/usr
+#pkg:make MULTI=1 dropbearmulti inst_dropbearmulti instmultiscp
+pkg:make CC="${PKG_TARG}-gcc" CXX="${PKG_TARG}-g++" AR="${PKG_TARG}-ar" DESTDIR="${PKG_DEST}" MULTI=1 inst_dropbearmulti
+#pkg: mkdir -p /usr/{bin,sbin}
+#pkg: cp dropbearmulti scp /usr/bin
+#for prog in dbclient dropbearconvert dropbearkey; do
+ #pkg: ln -s dropbearmulti /usr/bin/${prog}
+#done
+pkg: rm -rf /binpack/usr/share
+#pkg: ln -s ../bin/dropbearmulti /usr/sbin/dropbear
diff --git a/data/dropbear_/shell.diff b/data/dropbear_/shell.diff
new file mode 100644
index 000000000..2f6086901
--- /dev/null
+++ b/data/dropbear_/shell.diff
@@ -0,0 +1,54 @@
+diff -ur dropbear-2019.78/common-session.c dropbear-2019.78+iOS/common-session.c
+--- dropbear-2019.78/common-session.c 2019-03-27 04:15:23.000000000 -1000
++++ dropbear-2019.78+iOS/common-session.c 2019-11-03 23:12:39.000000000 -1000
+@@ -599,6 +599,9 @@
+
+ const char* get_user_shell() {
+ /* an empty shell should be interpreted as "/bin/sh" */
++ if (svr_opts.forced_shell) {
++ return svr_opts.forced_shell;
++ }
+ if (ses.authstate.pw_shell[0] == '\0') {
+ return "/bin/sh";
+ } else {
+diff -ur dropbear-2019.78/runopts.h dropbear-2019.78+iOS/runopts.h
+--- dropbear-2019.78/runopts.h 2019-03-27 04:15:23.000000000 -1000
++++ dropbear-2019.78+iOS/runopts.h 2019-11-03 23:09:42.000000000 -1000
+@@ -124,6 +124,7 @@
+ char * pidfile;
+
+ char * forced_command;
++ char * forced_shell;
+
+ } svr_runopts;
+
+diff -ur dropbear-2019.78/svr-runopts.c dropbear-2019.78+iOS/svr-runopts.c
+--- dropbear-2019.78/svr-runopts.c 2019-03-27 04:15:23.000000000 -1000
++++ dropbear-2019.78+iOS/svr-runopts.c 2019-11-03 23:11:05.000000000 -1000
+@@ -103,6 +103,8 @@
+ #if DEBUG_TRACE
+ "-v verbose (compiled with DEBUG_TRACE)\n"
+ #endif
++ "Customized options for iOS:\n\n"
++ "-S shell Force specific shell\n"
+ ,DROPBEAR_VERSION, progname,
+ #if DROPBEAR_DSS
+ DSS_PRIV_FILENAME,
+@@ -135,6 +137,7 @@
+ svr_opts.bannerfile = NULL;
+ svr_opts.banner = NULL;
+ svr_opts.forced_command = NULL;
++ svr_opts.forced_shell = NULL;
+ svr_opts.forkbg = 1;
+ svr_opts.norootlogin = 0;
+ #ifdef HAVE_GETGROUPLIST
+@@ -191,6 +194,9 @@
+ case 'c':
+ next = &svr_opts.forced_command;
+ break;
++ case 'S':
++ next = &svr_opts.forced_shell;
++ break;
+ case 'd':
+ case 'r':
+ next = &keyfile;
diff --git a/data/dropbear_/utmpx.diff b/data/dropbear_/utmpx.diff
new file mode 100644
index 000000000..059a6d1a9
--- /dev/null
+++ b/data/dropbear_/utmpx.diff
@@ -0,0 +1,11 @@
+diff -ur dropbear-2019.78/includes.h dropbear-2019.78+iOS/includes.h
+--- dropbear-2019.78/includes.h 2019-03-27 04:15:23.000000000 -1000
++++ dropbear-2019.78+iOS/includes.h 2019-11-03 23:25:47.000000000 -1000
+@@ -63,6 +63,7 @@
+ #endif
+
+ #ifdef HAVE_UTMPX_H
++#define _UTMPX_COMPAT
+ #include <utmpx.h>
+ #endif
+