dropbear: update to 2018.76 (#2356)
[termux-packages] / packages / dropbear / compat.c.patch
1 diff -uNr dropbear-2018.76/compat.c dropbear-2018.76.mod/compat.c
2 --- dropbear-2018.76/compat.c 2018-02-27 16:25:10.000000000 +0200
3 +++ dropbear-2018.76.mod/compat.c 2018-04-21 13:47:36.443738351 +0300
4 @@ -232,7 +232,7 @@
5
6 static char **initshells() {
7 /* don't touch this list. */
8 - static const char *okshells[] = { "/bin/sh", "/bin/csh", NULL };
9 + static const char *okshells[] = { "@TERMUX_PREFIX@/bin/sh", "@TERMUX_PREFIX@/bin/csh", NULL };
10 register char **sp, *cp;
11 register FILE *fp;
12 struct stat statb;
13 @@ -244,7 +244,7 @@
14 if (strings != NULL)
15 free(strings);
16 strings = NULL;
17 - if ((fp = fopen("/etc/shells", "rc")) == NULL)
18 + if ((fp = fopen("@TERMUX_PREFIX@/etc/shells", "rc")) == NULL)
19 return (char **) okshells;
20 if (fstat(fileno(fp), &statb) == -1) {
21 (void)fclose(fp);