Make busybox compile for 64-bits
[termux-packages] / packages / busybox / telnetd.patch
1 diff -u -r ../busybox-1.23.2/networking/telnetd.c ./networking/telnetd.c
2 --- ../busybox-1.23.2/networking/telnetd.c 2015-03-22 23:07:19.000000000 -0400
3 +++ ./networking/telnetd.c 2015-08-09 07:23:22.408532696 -0400
4 @@ -31,8 +31,8 @@
5 //usage: "\n -K Close connection as soon as login exits"
6 //usage: "\n (normally wait until all programs close slave pty)"
7 //usage: IF_FEATURE_TELNETD_STANDALONE(
8 -//usage: "\n -p PORT Port to listen on"
9 -//usage: "\n -b ADDR[:PORT] Address to bind to"
10 +//usage: "\n -p PORT Port to listen on (default 8023)"
11 +//usage: "\n -b ADDR[:PORT] Address to bind to (default *:8023)"
12 //usage: "\n -F Run in foreground"
13 //usage: "\n -i Inetd mode"
14 //usage: IF_FEATURE_TELNETD_INETD_WAIT(
15 @@ -84,8 +84,9 @@
16 } FIX_ALIASING;
17 #define G (*(struct globals*)&bb_common_bufsiz1)
18 #define INIT_G() do { \
19 - G.loginpath = "/bin/login"; \
20 - G.issuefile = "/etc/issue.net"; \
21 + struct passwd* pwd = getpwuid(getuid()); \
22 + G.loginpath = pwd->pw_shell; \
23 + G.issuefile = "@TERMUX_PREFIX@/etc/issue.net"; \
24 } while (0)
25
26
27 @@ -535,7 +536,7 @@
28 } else {
29 master_fd = 0;
30 if (!(opt & OPT_WAIT)) {
31 - unsigned portnbr = 23;
32 + unsigned portnbr = 8023;
33 if (opt & OPT_PORT)
34 portnbr = xatou16(opt_portnbr);
35 master_fd = create_and_bind_stream_or_die(opt_bindaddr, portnbr);