]> TLD Linux GIT Repositories - packages/mksh.git/blob - mksh-mkshrc_support.patch
- merged 59c from PLD, recreated patches for fuzz 0
[packages/mksh.git] / mksh-mkshrc_support.patch
1 diff -ur mksh.orig/main.c mksh/main.c
2 --- mksh.orig/main.c    2020-10-01 22:29:21.000000000 +0200
3 +++ mksh/main.c 2021-01-18 19:11:59.615180226 +0100
4 @@ -695,9 +695,14 @@
5                 if (Flag(FLOGIN))
6                         include(substitute("$HOME/.profile", 0), 0, NULL, true);
7                 if (Flag(FTALKING)) {
8 -                       cp = substitute("${ENV:-" MKSHRC_PATH "}", DOTILDE);
9 +                       cp = substitute("${ENV}", DOTILDE);
10                         if (cp[0] != '\0')
11                                 include(cp, 0, NULL, true);
12 +                       else {
13 +                               cp = substitute(MKSHRC_PATH, DOTILDE);
14 +                               include("/etc/mkshrc", 0, NULL, true);
15 +                               include(cp, 0, NULL, true);
16 +                       }
17                 }
18         }
19         if (restricted_shell) {