Skip to content
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

inetd mode and disable_syslog should be compatible #218

Closed
skarnet opened this issue Feb 10, 2023 · 3 comments
Closed

inetd mode and disable_syslog should be compatible #218

skarnet opened this issue Feb 10, 2023 · 3 comments

Comments

@skarnet
Copy link

skarnet commented Feb 10, 2023

Hi,

When trying to build dropbear-2022.83, with only INETD_MODE and DISABLE_SYSLOG, the binary refuses to run, saying: Dropbear inetd mode is incompatible with debug -v or non-syslog.

A comment in the code says:
/* log output goes to stderr which would get sent over the inetd network socket */.

But this is inaccurate. Super-servers like s6-tcpserver and tcpsvd, which spawn inetd-mode processes, do not conflate stdout and stderr; the daemon's stdout is sent over the network socket, but the daemon's stderr is properly sent to the logger. Using syslog has never been necessary in inetd mode; my server runs with lots of daemons under s6-tcpserver and no syslogd at all. It worked with the 2020 version of dropbear; I was surprised that it stopped working when I upgraded.

Could the functionality please be restored?

Thanks.

@mkj mkj added the regression label Feb 11, 2023
@mkj
Copy link
Owner

mkj commented Feb 11, 2023

I hadn't realised stderr worked OK with those.
I'll change it to allow non-syslog. I wonder if there's any way to catch running under an unsupported inetd - there have been cases reported in the past where it seemed to work but then the connection mysteriously broke when debug output was printed.

I added the test for -v back in 2018.

@skarnet
Copy link
Author

skarnet commented Feb 11, 2023

Thanks!

I think it's more a question of "bad configuration" than "unsupported inetd". Any inetd-like superserver can send stderr to stdout when misconfigured, and that would obviously cause issues - but it's neither on you, nor on the inetd author. Admins are responsible for handling their tools properly.

@opk12
Copy link

opk12 commented Apr 4, 2023

Thank you for the fix. This allows to debug configuration issues on the ubiquitous systemd, where you can configure StandardError=file:/error_output.txt.

mkj added a commit that referenced this issue Dec 11, 2023
An inetd-alike should be able to distinguish stdout and stderr, so
it's a valid configuration.

Fixes #218 on github
@mkj mkj closed this as completed in 383cc8c Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants