shellinabox: remove /bin/applets from PATH
This commit is contained in:
parent
11ae34095b
commit
fe75678f37
@ -6,7 +6,7 @@ diff -uNr shellinabox-2.20/libhttp/ssl.c shellinabox-2.20.mod/libhttp/ssl.c
|
|||||||
check(NOINTR(close(fd)) == 0);
|
check(NOINTR(close(fd)) == 0);
|
||||||
umask(077);
|
umask(077);
|
||||||
- check(setenv("PATH", "/usr/bin:/usr/sbin", 1) == 0);
|
- 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;
|
char *subject;
|
||||||
check(subject = stringPrintf(NULL, "/CN=%s/", serverName));
|
check(subject = stringPrintf(NULL, "/CN=%s/", serverName));
|
||||||
if (execlp("openssl", "openssl", "req", "-x509", "-nodes", "-days", "7300",
|
if (execlp("openssl", "openssl", "req", "-x509", "-nodes", "-days", "7300",
|
||||||
|
@ -43,7 +43,7 @@ diff -uNr shellinabox-2.20/shellinabox/launcher.c shellinabox-2.20.mod/shellinab
|
|||||||
check(
|
check(
|
||||||
(*environment)[numEnvVars++] = strdup(
|
(*environment)[numEnvVars++] = strdup(
|
||||||
- "PATH=/usr/local/bin:/usr/bin:/bin:/usr/games"));
|
- "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",
|
(*environment)[numEnvVars++] = stringPrintf(NULL, "LOGNAME=%s",
|
||||||
service->user);
|
service->user);
|
||||||
(*environment)[numEnvVars++] = stringPrintf(NULL, "USER=%s", service->user);
|
(*environment)[numEnvVars++] = stringPrintf(NULL, "USER=%s", service->user);
|
||||||
|
Loading…
Reference in New Issue
Block a user