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

sftp: Fix drawing of prompt in interactive mode w/o editline #480

Closed
wants to merge 1 commit into from

Conversation

nmeum
Copy link

@nmeum nmeum commented Apr 1, 2024

When sftp is compiled without editline support, the prompt is printed using printf(3). However, since printf uses buffered I/O it may not be displayed directly (e.g. if the output is line-buffered). To workaround that, force flushing of stdout.

This is patch has been applied in downstream Alpine Linux since 2014. In an effort to reduce the patchset of the Alpine Linux OpenSSH package, I would like to see this patch integrated upstream.

When sftp is compiled without editline support, the prompt is
printed using printf(3). However, since printf uses buffered
I/O it may not be displayed directly (e.g. if the output is
line-buffered). To workaround that, force flushing of stdout.

This is patch has been applied in downstream Alpine Linux since
2014. In an effort to reduce the patchset of the Alpine Linux
ssh package, I would like to see this patch integrated upstream.

Co-authored-by: Peter Bui <[email protected]>
algitbot pushed a commit to alpinelinux/aports that referenced this pull request Apr 1, 2024
This patch changes code that is only executed when OpenSSH is compiled
without editline support. I assume, in 2014 (when this patch was added)
this was still the case. However, nowadays we compile OpenSSH with
editline support, hence the prompt is drawn by editline and we no longer
need this patch.

Nonetheless, since the problem still persists when OpenSSH is compiled
without editline support, I also proposed the patch for upstream
integration: openssh/openssh-portable#480
bell-sw pushed a commit to bell-sw/alpaquita-aports that referenced this pull request Apr 3, 2024
[ commit b544dbe9982060824869f64028919ccf17054542 ]

This patch changes code that is only executed when OpenSSH is compiled
without editline support. I assume, in 2014 (when this patch was added)
this was still the case. However, nowadays we compile OpenSSH with
editline support, hence the prompt is drawn by editline and we no longer
need this patch.

Nonetheless, since the problem still persists when OpenSSH is compiled
without editline support, I also proposed the patch for upstream
integration: openssh/openssh-portable#480
@djmdjm
Copy link
Contributor

djmdjm commented Apr 30, 2024

Thanks - this has been merged upstream and synced back as 14e2b16

@djmdjm djmdjm closed this Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants