[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    AW: [PATCH] ash: Load $ENV file also if $SSH_CLIENT/SSH2_CLIENT is preset in env, reformat
From:       Walter Harms <wharms () bfs ! de>
Date:       2020-11-02 12:45:14
Message-ID: dde9dff3ab5249919ecea81a51d807f9 () bfs ! de
[Download RAW message or body]

i am sorry i am not an expert in bash booting behavior.
Would you mind to drop a few words what bash does in such cases ?
________________________________________
Von: busybox <busybox-bounces@busybox.net> im Auftrag von Björn Bidar \
                <bjorn.bidar@jolla.com>
Gesendet: Montag, 2. November 2020 11:16:32
An: busybox@busybox.net
Betreff: [PATCH] ash: Load $ENV file also if $SSH_CLIENT/SSH2_CLIENT is preset in \
env, reformat

This emulates the behavior of bash loading .bashrc when $SSH_CLIENT or $SSH2_CLIENT \
is preset in env.

Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
---
 shell/ash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shell/ash.c b/shell/ash.c
index ecb9b132b..797763187 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -14467,7 +14467,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
 #ifndef linux
         getuid() == geteuid() && getgid() == getegid() &&
 #endif
-        iflag
+        iflag || ( minusc && ( lookupvar("SSH_CLIENT") != NULL || \
lookupvar("SSH2_CLIENT") != NULL)) && rootshell  ) {
                const char *shinit = lookupvar("ENV");
                if (shinit != NULL && *shinit != '\0')
--
2.28.0



16:00
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic