-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
main/busybox: enable telnetd #1092
Conversation
IMHO It's a wrong package to add telnetd. It would installed for all by default, but nobody need it. You can remade and rename "community/inetutils-syslogd" to reuse all it functionality not only syslogd. |
I agree with @vakartel about not enabling telnet in busybox. I think that it'd be better to create package for e.g. BSD telnet implementation. |
Thank you for your feedback, @vakartel and @jirutka. I have some comments though, and hope I can change your mind.
The thing is, that I want to have the telnetd in my initramfs for debugging an embedded device over network. So it should be as small as possible, and should not have any login code for example and not introduce additional dependencies, such as an inetd or require an To be more precise, I am playing with a native Alpine Linux installation on an Android phone (of course I'll share if anything usable comes out of this). There is an init script, that works with busybox' telnetd and I'd rather use it as is without hacking in another telnetd and making the resulting initramfs bigger.
"Nobody need it" could also be said about the telnet client - I guess the usage is as widespread as the usage of the telnetd. Yet it is enabled in Alpine Linux' busybox config. Including telnetd increases the busybox binary on armhf by exactly 4096 bytes, from 955912 to 960008. So we only have an increase of 0.4% (!) of the total executable size. So... one more time, could you please accept the PR? |
telnet client is not only to connect to telnetd server. It's often used to make a testing connections to non-ssl tcp servers like smtp, pop3, imap, http etc. for a very simple telnet client/server emulation there is nc (netcat) in busybox. |
Good idea with netcat @vakartel! I will use something like the following then:
|
Glad you like it. |
Turns out, netcat has too many limitations compared to busybox' telnetd (problems with stderr - redirection as shown above does not work in practice; can't type in passwords without being visible on the screen with a normal telnet client etc.). Does it make sense to make a pull-request for that, or will it be declined? |
i'm okay with adding telnetd if there is an actual usecase for it. it sounds like there is to me. @ncopa what do you think |
Im ok with a separate package for it. I would prefer not enable it in the default busybox binary since I don´t want to tempt people to use it instead of ssh. Maybe we should also move out telnet client? |
@ncopa that seems fine to me. @ollieparanoid can you submit a PR that moves telnet and telnetd to it's own busybox binary? :) |
@kaniini: Sure, I will do that within the next week. |
b764ebd
to
31bb865
Compare
As suggested by @ncopa and @kaniini on GitHub: alpinelinux#1092
Updated :) |
creating multiple version of busybox to prevent users from using unsafe daemons/clients sounds plausible to me. In the end we will have the same PR's for ftpd, httpd and all insecure clients as well? |
@clandmeter i agree, that would be quite nice. but we can do it for 3.7. |
We can do it post 3.6, should probably make a list of all tools that are applicable to -extras. @ollieparanoid can you work on this (including matching install file) so we can merge it after we branch 3.6? |
I like the 'busybox-extras' idea. What would you think about having the 'busybox-extras' package replace the normal 'busybox' package, once it is installed (-> make it conflict with the busybox package)? So the users would only have one binary, even if the additional features are needed. If you guys agree, I could directly work on the 'busybox-extras' subpackage (including the install file). It would be nice if you could provide a list of busybox widgets, which should only be in extras, otherwise I'd use this list:
|
@ollieparanoid sounds good to me |
31bb865
to
65ee6c0
Compare
Here is the update. I have also moved tftp to busybox-extras, and added tftpd there. The install files take care of properly removing symlinks now (whenever necessary). Test output of upgrading/installing busybox and busybox-extras, and probing for telnet: Removing busybox-extras to re-install busybox is a bit unintuitive, so I have written the commands in the post-install of busybox-extras. (I think, that this could be simplified in apk: when running |
Could someone review/merge this please? @kaniini @clandmeter @ncopa |
If I understood @clandmeter right, this can go to testing after 3.6 has been branched. Anything more left for me to do here? |
@vakartel @jirutka @kaniini @clandmeter @ncopa 3.6 is out, so let's talk about this PR again. I did as @clandmeter asked above:
My comment from one month ago shows the workflow, that one would have with installing Please tell me, if this is good enough, and if you would accept the PR if I rebased it. I'd like to contribute more, but not hearing from you for so long makes it kind of hard... would it be better if I set up a bouncer and joined IRC? Thanks. |
@ollieparanoid What do you think about building a That way we make the uninstall as simple as |
I'd rather have I will rebase the code and make it work like you suggested (two binaries: Thank you! |
The following programs have been moved from busybox to -extras: ftpget, ftpput, telnet, tftp, ftpd, httpd New programs in -extras: telnetd, tftpd
4dfcdd0
to
23f4c6b
Compare
this is nice. very nice. Thank you 👍 |
Merged in 23f4c6b by @ollieparanoid. Thanks for your contribution! (This pull request has been closed automatically by GitHub PR Closer. If you think that it’s not resolved yet, please add a comment.) |
Pull request, that got merged: alpinelinux/aports#1092 Please note, that you can't directly upgrade from postmarketOS "busybox-extras" to the upstreamed version. To upgrade properly, do the following: * delete your self-compiled busybox* packages: `sudo rm ~/.local/var/pmbootstrap/packages/armhf/busybox*` * zap all your armhf chroots with: `./pmbootstrap.py zap`
I'd like to have telnetd for debugging embedded devices via Ethernet over USB.
EDIT: Forgot to say, that I have built the package with this configuration and tested the telnetd, and it worked.