1
0
mirror of http://galexander.org/git/simplesshd.git synced 2024-11-27 01:38:11 +00:00

now it can execute rsync, which mostly works

This commit is contained in:
Greg Alexander 2014-12-21 22:55:29 -05:00
parent f2fa3afa0c
commit 1412edbee7
2 changed files with 6 additions and 0 deletions

1
doit
View File

@ -1,5 +1,6 @@
ndk-build -j8 &&
mv libs/armeabi/scp libs/armeabi/libscp.so &&
mv libs/armeabi/sftp-server libs/armeabi/libsftp-server.so &&
mv libs/armeabi/rsync libs/armeabi/librsync.so &&
ant debug &&
cat bin/SimpleSSHD-debug.apk | ssh roach 'cat > /sdcard/buh.apk; source .profile; pm install -r /sdcard/buh.apk'

View File

@ -585,6 +585,11 @@ void run_shell_command(const char* cmd, unsigned int maxfd, char* usershell) {
sprintf(t, "%s/lib%s.so %s", NDK_EXECUTABLES_PATH, "scp",
cmd+4);
cmd = t;
} else if (cmd && !strncmp(cmd, "rsync ", 6)) {
char *t = malloc(strlen(cmd)+strlen(NDK_EXECUTABLES_PATH)+80);
sprintf(t, "%s/lib%s.so %s", NDK_EXECUTABLES_PATH, "rsync",
cmd+6);
cmd = t;
}
if (cmd != NULL) {