termux-packages/packages/busybox/telnetd.patch

25 lines
812 B
Diff
Raw Normal View History

2016-10-08 23:54:48 +02:00
diff -u -r ../busybox-1.25.1/networking/telnetd.c ./networking/telnetd.c
--- ../busybox-1.25.1/networking/telnetd.c 2016-10-07 10:47:47.000000000 -0400
+++ ./networking/telnetd.c 2016-10-08 17:49:55.717890508 -0400
@@ -86,8 +86,9 @@
#define G (*(struct globals*)bb_common_bufsiz1)
2015-08-09 13:41:08 +02:00
#define INIT_G() do { \
2016-10-08 23:54:48 +02:00
setup_common_bufsiz(); \
2015-08-09 13:41:08 +02:00
- 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)
2016-10-08 23:54:48 +02:00
@@ -529,7 +530,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);