bugzilla-daemon at bugzilla.mindrot.org
2017-Oct-06 09:45 UTC
[Bug 2791] New: Match host exec doesn't resolve SHELL in the PATH
https://bugzilla.mindrot.org/show_bug.cgi?id=2791 Bug ID: 2791 Summary: Match host exec doesn't resolve SHELL in the PATH Product: Portable OpenSSH Version: 7.2p2 Hardware: amd64 OS: Mac OS X Status: NEW Severity: enhancement Priority: P5 Component: ssh Assignee: unassigned-bugs at mindrot.org Reporter: berdario at google.com If you have something like Match host *.example.com exec /usr/bin/true ProxyCommand /usr/local/bin/ssh-helper %h %p in your ssh config, and your SHELL contains the name of the shell executable (and not its path), connection will fail with: Unable to execute '/usr/bin/true': No such file or directory command '/usr/bin/true' exited abnormally /etc/ssh_config line 46: match exec '/usr/bin/true' error -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2017-Oct-23 01:26 UTC
[Bug 2791] Match host exec doesn't resolve SHELL in the PATH
https://bugzilla.mindrot.org/show_bug.cgi?id=2791 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |djm at mindrot.org --- Comment #1 from Damien Miller <djm at mindrot.org> --- I don't think searching $PATH for SHELL is correct. The system shoudl never set $SHELL to a relative path and http://pubs.opengroup.org/onlinepubs/009695399/functions/system.html specifies system(3) to use execl(2), and it doesn't search $PATH. -- 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
2017-Oct-24 09:19 UTC
[Bug 2791] Match host exec doesn't resolve SHELL in the PATH
https://bugzilla.mindrot.org/show_bug.cgi?id=2791 --- Comment #2 from berdario at google.com --- Uhm, system(3) should use sh(1) manpages for sh(1) on my system are explicitly about bash, but otherwise I think it should be about this: http://pubs.opengroup.org/onlinepubs/009695399/utilities/sh.html which says that the path for `sh` should be resolved from PATH (I was under the impression that the POSIX standard specified that /bin/sh would always have to exist, but I guess I was wrong?) I haven't looked into openssh source code, but given the above, I'd be surprised if it used system(3) I understand that the behavior might not be changed, but the error message Unable to execute '/usr/bin/true': No such file or directory Seems to be a bit misleading to me, given that the actual command executed would've been something like sh -c /usr/bin/true Thanks anyhow for looking into this -- 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
2017-Oct-24 09:20 UTC
[Bug 2791] Match host exec doesn't resolve SHELL in the PATH
https://bugzilla.mindrot.org/show_bug.cgi?id=2791 --- Comment #3 from berdario at google.com --- Forgot to add: Unable to execute 'sh': No such file or directory Would've been much clearer as an error message, imho -- 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
2017-Nov-03 13:43 UTC
[Bug 2791] Match host exec doesn't resolve SHELL in the PATH
https://bugzilla.mindrot.org/show_bug.cgi?id=2791 Roland Friedwagner <r.friedwagner at gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |r.friedwagner at gmail.com -- 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
2019-Jul-19 05:51 UTC
[Bug 2791] Match host exec doesn't resolve SHELL in the PATH
https://bugzilla.mindrot.org/show_bug.cgi?id=2791 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dtucker at dtucker.net Attachment #3302| |ok?(dtucker at dtucker.net) Flags| | --- Comment #4 from Damien Miller <djm at mindrot.org> --- Created attachment 3302 --> https://bugzilla.mindrot.org/attachment.cgi?id=3302&action=edit check shell is executable to provide better error message -- 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
2019-Jul-19 05:51 UTC
[Bug 2791] Match host exec doesn't resolve SHELL in the PATH
https://bugzilla.mindrot.org/show_bug.cgi?id=2791 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |2988 Referenced Bugs: https://bugzilla.mindrot.org/show_bug.cgi?id=2988 [Bug 2988] Tracking bug for 8.1 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
2019-Jul-19 06:12 UTC
[Bug 2791] Match host exec doesn't resolve SHELL in the PATH
https://bugzilla.mindrot.org/show_bug.cgi?id=2791 Darren Tucker <dtucker at dtucker.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3302|ok?(dtucker at dtucker.net) |ok+ Flags| | -- 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
2019-Aug-09 05:06 UTC
[Bug 2791] Match host exec doesn't resolve SHELL in the PATH
https://bugzilla.mindrot.org/show_bug.cgi?id=2791 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Damien Miller <djm at mindrot.org> --- patch applied and will be in openssh-8.1, due soon. Thanks! -- 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-Apr-23 05:08 UTC
[Bug 2791] Match host exec doesn't resolve SHELL in the PATH
https://bugzilla.mindrot.org/show_bug.cgi?id=2791 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.