You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 lines
1.8 KiB

diff -uNr shellinabox-2.20/shellinabox/service.c shellinabox-2.20.mod/shellinabox/service.c
--- shellinabox-2.20/shellinabox/service.c 2016-11-09 21:40:33.000000000 +0200
+++ shellinabox-2.20.mod/shellinabox/service.c 2020-01-03 01:47:07.845623596 +0200
@@ -94,9 +94,11 @@
// The next part of the argument is either the word 'LOGIN' or the
// application definition.
if (!strcmp(arg, "LOGIN")) {
+#ifndef __ANDROID__
if (geteuid()) {
fatal("[config] Must be \"root\" to invoke LOGIN service!");
}
+#endif
service->useLogin = 1;
service->useHomeDir = 0;
service->authUser = 0;
@@ -106,8 +108,7 @@
check(service->user = strdup("root"));
check(service->group = strdup("root"));
check(service->cwd = strdup("/"));
- check(service->cmdline = strdup(
- "/bin/login -p -h ${peer}"));
+ check(service->cmdline = strdup("@TERMUX_PREFIX@/bin/pwlogin"));
} else
#endif
if (!strcmp(arg, "SSH") || !strncmp(arg, "SSH:", 4)) {
@@ -175,8 +176,7 @@
"-oHostbasedAuthentication=no -oIdentitiesOnly=yes "
"-oKbdInteractiveAuthentication=yes -oPasswordAuthentication=yes "
"-oPreferredAuthentications=keyboard-interactive,password "
- "-oPubkeyAuthentication=no -oRhostsRSAAuthentication=no "
- "-oRSAAuthentication=no -oStrictHostKeyChecking=no -oTunnel=no "
+ "-oPubkeyAuthentication=no -oStrictHostKeyChecking=no -oTunnel=no "
"-oUserKnownHostsFile=/dev/null -oVerifyHostKeyDNS=no "
// beewoolie-2012.03.30: while it would be nice to disable this
// feature, we cannot be sure that it is available on the