AW: [PATCH] ash: Load $ENV file also if $SSH_CLIENT/SSH2_CLIENT is preset in env, reformat
Björn Bidar
bjorn.bidar at jolla.com
Mon Jan 4 19:48:32 UTC 2021
Am Montag, 4. Januar 2021, 14:43:46 EET schrieben Sie:
> On Sun, Jan 3, 2021 at 6:25 PM Björn Bidar <bjorn.bidar at jolla.com> wrote:
> > Am Sonntag, 3. Januar 2021, 11:43:25 EET schrieben Sie:
> > > I can see that ash users also might need their init scripts to be run
> > > for "ssh USER at HOST COMMAND", but ash has no .bashrc analogue as of now.
> > > Your code does not reproduce bash behavior - bash does NOT run $ENV
> > > script, it runs .bashrc script for ssh (see above).
> >
> > I know that, that is why I said it emulates a behaviour.
> >
> > > IOW - the patch adds a special-case for ssh which is *different*
> > > from bash.
> > >
> > > Please explain your real-world scenario which prompted you
> > > to create the patch.
> >
> > The real world scenario is that a user might run commands via ssh on a
> > device using busybox ash but expect a certain set of environment
> > variables present or run some scripts that set up the shell session.
>
> I meant: what was _your_ real-world scenario which prompted you to create
> the patch. You had $ENV set up? Where it was set from - /etc/profile?
> ~/.profile?
> It was doing which important setup? Why moving this setup to .profile
> was not feasible? etc...
Profile is not sourced in an non interactive session eg. Ssh foobar bar
I explained my real world scenario already a developer running a common to a
device via ssh and needing to have that environment setup.
I set the Env Variable in sshd_config but it could be setup anywhere eg. to
emulate an rc file.
More information about the busybox
mailing list