termux-packages/packages/busybox/telnetd.patch

36 lines
1.3 KiB
Diff
Raw Normal View History

2015-08-09 13:41:08 +02:00
diff -u -r ../busybox-1.23.2/networking/telnetd.c ./networking/telnetd.c
--- ../busybox-1.23.2/networking/telnetd.c 2015-03-22 23:07:19.000000000 -0400
+++ ./networking/telnetd.c 2015-08-09 07:23:22.408532696 -0400
2015-06-13 01:03:31 +02:00
@@ -31,8 +31,8 @@
//usage: "\n -K Close connection as soon as login exits"
//usage: "\n (normally wait until all programs close slave pty)"
//usage: IF_FEATURE_TELNETD_STANDALONE(
-//usage: "\n -p PORT Port to listen on"
-//usage: "\n -b ADDR[:PORT] Address to bind to"
+//usage: "\n -p PORT Port to listen on (default 8023)"
+//usage: "\n -b ADDR[:PORT] Address to bind to (default *:8023)"
//usage: "\n -F Run in foreground"
//usage: "\n -i Inetd mode"
//usage: IF_FEATURE_TELNETD_INETD_WAIT(
2015-08-09 13:41:08 +02:00
@@ -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 @@
2015-06-13 01:03:31 +02:00
} else {
master_fd = 0;
if (!(opt & OPT_WAIT)) {
- unsigned portnbr = 23;
+ unsigned portnbr = 8023;
if (opt & OPT_PORT)
portnbr = xatou16(opt_portnbr);
master_fd = create_and_bind_stream_or_die(opt_bindaddr, portnbr);