diff options
Diffstat (limited to 'data/dropbear_/shell.diff')
-rw-r--r-- | data/dropbear_/shell.diff | 54 |
1 files changed, 54 insertions, 0 deletions
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; |