ZOSOpenTools / bashport

z/OS Port of bash: the GNU Project's shell - the Bourne Again SHell
Apache License 2.0
8 stars 3 forks source link

Bash does not source users bashrc file when started by non-interactive ssh command #65

Open DorianCzichotzki opened 10 months ago

DorianCzichotzki commented 10 months ago

When bash is started by the sshd daemon to run a non-interactive command, the ~/.bashrc script is not loaded.

Steps to Reproduce

  1. Set ZOSOpenTools bash as standard shell in OMVS segment
  2. Run ssh command non-interactively (e.g. ssh [host] -- "env")
  3. See that environment is missing required variables

Expected Behavior

Bash should source the bashrc file, even in an non-interactive session, when called by sshd or other remote daemons. See "Invoked by remote shell daemon" in section 6.2 of the bash manual (https://www.gnu.org/software/bash/manual/bash.html#Bash-Startup-Files).