bugzilla-daemon at mindrot.org
2004-Nov-05 00:05 UTC
[Bug 950] terminal settings not restored after Ctrl+C during password prompt in scp/sftp
http://bugzilla.mindrot.org/show_bug.cgi?id=950 Summary: terminal settings not restored after Ctrl+C during password prompt in scp/sftp Product: Portable OpenSSH Version: 3.8.1p1 Platform: Other OS/Version: Linux Status: NEW Severity: minor Priority: P2 Component: scp AssignedTo: openssh-bugs at mindrot.org ReportedBy: peak at argo.troja.mff.cuni.cz It appears there is a race condition between the handler for SIGINT et al. in scp/sftp and signal handling in readpassphrase(). When I press Ctrl+C during password prompt, SIGINT kills the parent process (scp/sftp) before the child process (ssh) exits. This makes the child process orphaned: it loses access to its controlling terminal, tcsetattr() fails with EIO, and readpassphrase() exits without restoring the original terminal settings (i.e. ECHO). The problem was observed on 3.8.1p1 on Linux 2.4. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2004-Nov-05 00:08 UTC
[Bug 950] terminal settings not restored after Ctrl+C during password prompt in scp/sftp
http://bugzilla.mindrot.org/show_bug.cgi?id=950 ------- Additional Comments From peak at argo.troja.mff.cuni.cz 2004-11-05 11:08 ------- Created an attachment (id=738) --> (http://bugzilla.mindrot.org/attachment.cgi?id=738&action=view) proposed patch This small patch (for 3.8.1p1 but should apply to the current version as well) fixes the problem. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.