bugzilla-daemon at bugzilla.mindrot.org
2018-Apr-20 08:47 UTC
[Bug 2860] New: "-lc" should be used for non-interactive session
https://bugzilla.mindrot.org/show_bug.cgi?id=2860
Bug ID: 2860
Summary: "-lc" should be used for non-interactive session
Product: Portable OpenSSH
Version: 7.7p1
Hardware: Other
OS: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: ssh
Assignee: unassigned-bugs at mindrot.org
Reporter: tom.ty89 at gmail.com
https://github.com/openssh/openssh-portable/blob/V_7_7/session.c#L1668
In interactive sessions, the shell would be started as "login shell",
/etc/profile (or zprofile in the case of zsh) would be sourced.
However, when user instructs ssh to execute a command with a
non-interactive session, because the shell is started without -l / --
login, the profile files would not be sourced, which leads to
inconsistency among the two types of sessions (typically missing
expected environment variables in the non-interactive session).
Is there any reason that the shell in a non-interactive session should
not be started as "login shell"?
--
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Apr-27 03:26 UTC
[Bug 2860] "-lc" should be used for non-interactive session
https://bugzilla.mindrot.org/show_bug.cgi?id=2860
Tom Yan <tom.ty89 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|enhancement |normal
--
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-May-01 15:26 UTC
[Bug 2860] "-lc" should be used for non-interactive session
https://bugzilla.mindrot.org/show_bug.cgi?id=2860
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |djm at mindrot.org
Resolution|--- |WONTFIX
--- Comment #1 from Damien Miller <djm at mindrot.org> ---
That inconsistency is intentional. Command execution sessions are
assumed to be non-interactive and are essential to ssh's use as a
transport for other protocols (e.g. rsync or git).
Shell profile scripts are allows to contain actions that write to
stdout and these would interfere with ssh being used as a transport if
sourced.
--
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-May-03 05:57 UTC
[Bug 2860] "-lc" should be used for non-interactive session
https://bugzilla.mindrot.org/show_bug.cgi?id=2860
Tom Yan <tom.ty89 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WONTFIX |---
--- Comment #2 from Tom Yan <tom.ty89 at gmail.com>
---> Command execution sessions are assumed to be non-interactive
Of course, but login shell is not equivalent to interactive shell
> Shell profile scripts are allows to contain actions that write to stdout
and these would interfere with ssh being used as a transport if sourced
It is the responsibility of the script writer that he/she should make
sure such actions are only performed in interactive shell (e.g. by
checking whether "$-" has i, or by putting them in the "rc"
file
instead).
It does not really make sense to break the non-interactive command
execution environment just for that, because ssh is logging in either
way.
--
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-May-03 16:43 UTC
[Bug 2860] "-lc" should be used for non-interactive session
https://bugzilla.mindrot.org/show_bug.cgi?id=2860
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WONTFIX
Status|REOPENED |RESOLVED
--- Comment #3 from Damien Miller <djm at mindrot.org> ---
We don't intend to change this for the reasons that I've already
described.
--
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-Oct-19 06:17 UTC
[Bug 2860] "-lc" should be used for non-interactive session
https://bugzilla.mindrot.org/show_bug.cgi?id=2860
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #4 from Damien Miller <djm at mindrot.org> ---
Close RESOLVED bugs with the release of openssh-8.0
--
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.