termux-packages/packages/dropbear/compat.c.patch
Leonid Plyushch c4061e081f dropbear: update to 2018.76 (#2356)
* dropbear: update to 2018.76

* dropbear: fix hardcoded paths

* dropbear: enable scp
2018-04-22 21:22:48 +02:00

22 lines
802 B
Diff

diff -uNr dropbear-2018.76/compat.c dropbear-2018.76.mod/compat.c
--- dropbear-2018.76/compat.c 2018-02-27 16:25:10.000000000 +0200
+++ dropbear-2018.76.mod/compat.c 2018-04-21 13:47:36.443738351 +0300
@@ -232,7 +232,7 @@
static char **initshells() {
/* don't touch this list. */
- static const char *okshells[] = { "/bin/sh", "/bin/csh", NULL };
+ static const char *okshells[] = { "@TERMUX_PREFIX@/bin/sh", "@TERMUX_PREFIX@/bin/csh", NULL };
register char **sp, *cp;
register FILE *fp;
struct stat statb;
@@ -244,7 +244,7 @@
if (strings != NULL)
free(strings);
strings = NULL;
- if ((fp = fopen("/etc/shells", "rc")) == NULL)
+ if ((fp = fopen("@TERMUX_PREFIX@/etc/shells", "rc")) == NULL)
return (char **) okshells;
if (fstat(fileno(fp), &statb) == -1) {
(void)fclose(fp);