bugzilla-daemon at bugzilla.mindrot.org
2018-Nov-03 16:48 UTC
[Bug 2926] New: In batch mode sftp echoes the prompt and the commands back
https://bugzilla.mindrot.org/show_bug.cgi?id=2926 Bug ID: 2926 Summary: In batch mode sftp echoes the prompt and the commands back Product: Portable OpenSSH Version: 7.7p1 Hardware: amd64 OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: sftp Assignee: unassigned-bugs at mindrot.org Reporter: vincenzo.romano at notorand.it Batch mode is meant for script automation, not human operations, so echoing the prompt and the commands doesn't make any sense and needs extra stuff while programatically processing the output A possible solution that's also backward compatible with all uses of the batch mode is to allow for a special prefix character to commands to avoid any echoing, just like the "-" is used to avoid a single failing command to terminate the session. Something like "@" or "#" would be ok IMHO. For example, the command syntax could become: [@][-]<command> [arguments]... The current workaround is to expunge every first output line, but am not sure whether this can apply to all use cases. -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Nov-09 03:17 UTC
[Bug 2926] In batch mode sftp echoes the prompt and the commands back
https://bugzilla.mindrot.org/show_bug.cgi?id=2926 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned-bugs at mindrot.org |djm at mindrot.org CC| |djm at mindrot.org, | |dtucker at dtucker.net Attachment #3199| |ok?(dtucker at dtucker.net) Flags| | --- Comment #1 from Damien Miller <djm at mindrot.org> --- Created attachment 3199 --> https://bugzilla.mindrot.org/attachment.cgi?id=3199&action=edit allow '@' prefix to suppress command echo The prefix is a good idea. This implements '@command' to suppress echo. -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Nov-09 03:21 UTC
[Bug 2926] In batch mode sftp echoes the prompt and the commands back
https://bugzilla.mindrot.org/show_bug.cgi?id=2926 --- Comment #2 from Darren Tucker <dtucker at dtucker.net> --- Comment on attachment 3199 --> https://bugzilla.mindrot.org/attachment.cgi?id=3199 allow '@' prefix to suppress command echo>+ if (!interactive && *cmd != '@') { > mprintf("sftp> %s", cmd);You're only checking the first character but the man page says - and @ can be supplied in any order, so -@ is not going to do what the man page says. -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Nov-09 03:35 UTC
[Bug 2926] In batch mode sftp echoes the prompt and the commands back
https://bugzilla.mindrot.org/show_bug.cgi?id=2926 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3199|ok?(dtucker at dtucker.net) | Flags| | Attachment #3199|0 |1 is obsolete| | Attachment #3200| |ok? Flags| | --- Comment #3 from Damien Miller <djm at mindrot.org> --- Created attachment 3200 --> https://bugzilla.mindrot.org/attachment.cgi?id=3200&action=edit Allow @ and - to appear in any order Darren points out that, despite what I advertised in the manpage, my previous patch did not allow '-' and '@' to appear in any order. This fixes this by moving the echo until after the entire command has been parsed. -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Nov-09 03:44 UTC
[Bug 2926] In batch mode sftp echoes the prompt and the commands back
https://bugzilla.mindrot.org/show_bug.cgi?id=2926 Darren Tucker <dtucker at dtucker.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3200|ok? |ok+ Flags| | -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Nov-16 02:30 UTC
[Bug 2926] In batch mode sftp echoes the prompt and the commands back
https://bugzilla.mindrot.org/show_bug.cgi?id=2926 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Blocks| |2915 --- Comment #4 from Damien Miller <djm at mindrot.org> --- Patch is committed and will be in OpenSSH 8.0 Referenced Bugs: https://bugzilla.mindrot.org/show_bug.cgi?id=2915 [Bug 2915] Tracking bug for 8.0 release -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Nov-16 08:03 UTC
[Bug 2926] In batch mode sftp echoes the prompt and the commands back
https://bugzilla.mindrot.org/show_bug.cgi?id=2926 --- Comment #5 from Enzo <vincenzo.romano at notorand.it> --- At the section "Lines 1282-1294 parse_args(const char **cpp, int *ignore_errors, int *aflag," I see a possible bug. You can intercept the "-" and the "@" at any place in the command string. Which can lead to unwanted results. IMHO the correct code could begin with something like: for (char* cpend=cp+2;*cp != '\0' && cp < cpend; cp++) { -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2021-Apr-23 05:00 UTC
[Bug 2926] In batch mode sftp echoes the prompt and the commands back
https://bugzilla.mindrot.org/show_bug.cgi?id=2926 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Damien Miller <djm at mindrot.org> --- closing resolved bugs as of 8.6p1 release -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2021-Oct-13 14:40 UTC
[Bug 2926] In batch mode sftp echoes the prompt and the commands back
https://bugzilla.mindrot.org/show_bug.cgi?id=2926 Ahmed Sayeed <ahmedsayeed1982 at yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ahmedsayeed1982 at yahoo.com --- Comment #7 from Ahmed Sayeed <ahmedsayeed1982 at yahoo.com> --- [gdb/breakpoints] Handle glibc with debuginfo in create_exception_master_breakpoint http://www-look-4.com/computers/huawei-computers/ The test-case nextoverthrow.exp is failing on targets with unstripped libc. https://komiya-dental.com/category/services/ This is a regression since commit 1940319c0ef "[gdb] Fix internal-error in process_event_stop_test". http://www.iu-bloomington.com/category/services/ The problem is that this code in create_exception_master_breakpoint: ... for (objfile *sepdebug = obj->separate_debug_objfile; https://waytowhatsnext.com/category/services/ sepdebug != nullptr; sepdebug sepdebug->separate_debug_objfile) if (create_exception_master_breakpoint_hook (sepdebug)) ... http://www.wearelondonmade.com/computers/car-computers/ iterates over all the separate debug object files, but fails to handle the case that obj itself has the debug info we're looking for. http://www.jopspeech.com/health/nvidia-rtx-2060/ Fix this by using the separate_debug_objfiles () range instead, which does iterate both over obj and the obj->separate_debug_objfile chain. http://joerg.li/health/xiaomi/ Tested on x86_64-linux. http://connstr.net/computers/chargers-tech/ gdb/ChangeLog: [gdb/breakpoints] Handle glibc with debuginfo in create_exception_master_breakpoint http://embermanchester.uk/computers/video-conversation/ The test-case nextoverthrow.exp is failing on targets with unstripped libc. http://www.slipstone.co.uk/computers/isofix/ This is a regression since commit 1940319c0ef "[gdb] Fix internal-error in process_event_stop_test". http://www.logoarts.co.uk/computers/printer-types/ The problem is that this code in create_exception_master_breakpoint: ... http://www.acpirateradio.co.uk/technology/facetime/ for (objfile *sepdebug = obj->separate_debug_objfile; sepdebug != nullptr; sepdebug sepdebug->separate_debug_objfile) if (create_exception_master_breakpoint_hook (sepdebug)) http://www.compilatori.com/computers/smartphones/ ... iterates over all the separate debug object files, but fails to handle the case that obj itself has the debug info we're looking for. https://www.webb-dev.co.uk/category/services/ Fix this by using the separate_debug_objfiles () range instead, which does iterate both over obj and the obj->separate_debug_objfile chain. Tested on x86_64-linux. gdb/ChangeLog: -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.