From fe75678f3793e4f40855f1bdaa07ee793a817534 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Thu, 9 Jul 2020 01:34:32 +0300 Subject: [PATCH] shellinabox: remove /bin/applets from PATH --- packages/shellinabox/shellinabox-2.20_libhttp_ssl.c.patch | 2 +- .../shellinabox/shellinabox-2.20_shellinabox_launcher.c.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/shellinabox/shellinabox-2.20_libhttp_ssl.c.patch b/packages/shellinabox/shellinabox-2.20_libhttp_ssl.c.patch index c87f6c28e..47d745afa 100644 --- a/packages/shellinabox/shellinabox-2.20_libhttp_ssl.c.patch +++ b/packages/shellinabox/shellinabox-2.20_libhttp_ssl.c.patch @@ -6,7 +6,7 @@ diff -uNr shellinabox-2.20/libhttp/ssl.c shellinabox-2.20.mod/libhttp/ssl.c check(NOINTR(close(fd)) == 0); umask(077); - check(setenv("PATH", "/usr/bin:/usr/sbin", 1) == 0); -+ check(setenv("PATH", "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets", 1) == 0); ++ check(setenv("PATH", "@TERMUX_PREFIX@/bin", 1) == 0); char *subject; check(subject = stringPrintf(NULL, "/CN=%s/", serverName)); if (execlp("openssl", "openssl", "req", "-x509", "-nodes", "-days", "7300", diff --git a/packages/shellinabox/shellinabox-2.20_shellinabox_launcher.c.patch b/packages/shellinabox/shellinabox-2.20_shellinabox_launcher.c.patch index 43e67e04e..c687e25d3 100644 --- a/packages/shellinabox/shellinabox-2.20_shellinabox_launcher.c.patch +++ b/packages/shellinabox/shellinabox-2.20_shellinabox_launcher.c.patch @@ -43,7 +43,7 @@ diff -uNr shellinabox-2.20/shellinabox/launcher.c shellinabox-2.20.mod/shellinab check( (*environment)[numEnvVars++] = strdup( - "PATH=/usr/local/bin:/usr/bin:/bin:/usr/games")); -+ "PATH=@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets")); ++ "PATH=@TERMUX_PREFIX@/bin")); (*environment)[numEnvVars++] = stringPrintf(NULL, "LOGNAME=%s", service->user); (*environment)[numEnvVars++] = stringPrintf(NULL, "USER=%s", service->user);