Browse Source

busybox: Fix telnetd login shell

android-5
Fredrik Fornwall 10 years ago
parent
commit
977ad1af3b
  1. 2
      packages/busybox/build.sh
  2. 20
      packages/busybox/telnetd.patch

2
packages/busybox/build.sh

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://www.busybox.net/
TERMUX_PKG_DESCRIPTION="Tiny versions of many common UNIX utilities into a single small executable" TERMUX_PKG_DESCRIPTION="Tiny versions of many common UNIX utilities into a single small executable"
TERMUX_PKG_ESSENTIAL=yes TERMUX_PKG_ESSENTIAL=yes
TERMUX_PKG_VERSION=1.23.2 TERMUX_PKG_VERSION=1.23.2
TERMUX_PKG_BUILD_REVISION=4 TERMUX_PKG_BUILD_REVISION=5
TERMUX_PKG_SRCURL=http://www.busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2 TERMUX_PKG_SRCURL=http://www.busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_BUILD_IN_SRC=yes TERMUX_PKG_BUILD_IN_SRC=yes

20
packages/busybox/telnetd.patch

@ -1,6 +1,6 @@
diff -u -r ../busybox-1.22.1/networking/telnetd.c ./networking/telnetd.c diff -u -r ../busybox-1.23.2/networking/telnetd.c ./networking/telnetd.c
--- ../busybox-1.22.1/networking/telnetd.c 2014-01-09 19:15:44.000000000 +0100 --- ../busybox-1.23.2/networking/telnetd.c 2015-03-22 23:07:19.000000000 -0400
+++ ./networking/telnetd.c 2014-01-20 08:47:37.000000000 +0100 +++ ./networking/telnetd.c 2015-08-09 07:23:22.408532696 -0400
@@ -31,8 +31,8 @@ @@ -31,8 +31,8 @@
//usage: "\n -K Close connection as soon as login exits" //usage: "\n -K Close connection as soon as login exits"
//usage: "\n (normally wait until all programs close slave pty)" //usage: "\n (normally wait until all programs close slave pty)"
@ -12,7 +12,19 @@ diff -u -r ../busybox-1.22.1/networking/telnetd.c ./networking/telnetd.c
//usage: "\n -F Run in foreground" //usage: "\n -F Run in foreground"
//usage: "\n -i Inetd mode" //usage: "\n -i Inetd mode"
//usage: IF_FEATURE_TELNETD_INETD_WAIT( //usage: IF_FEATURE_TELNETD_INETD_WAIT(
@@ -535,7 +535,7 @@ @@ -84,8 +84,9 @@
} FIX_ALIASING;
#define G (*(struct globals*)&bb_common_bufsiz1)
#define INIT_G() do { \
- G.loginpath = "/bin/login"; \
- G.issuefile = "/etc/issue.net"; \
+ struct passwd* pwd = getpwuid(getuid()); \
+ G.loginpath = pwd->pw_shell; \
+ G.issuefile = "@TERMUX_PREFIX@/etc/issue.net"; \
} while (0)
@@ -535,7 +536,7 @@
} else { } else {
master_fd = 0; master_fd = 0;
if (!(opt & OPT_WAIT)) { if (!(opt & OPT_WAIT)) {

Loading…
Cancel
Save