Skip to content
Snippets Groups Projects
Commit 23091495 authored by Matthias Goebl's avatar Matthias Goebl
Browse files

added sftp-server that rgeorgi@gmail.com posted in from...

added sftp-server that rgeorgi@gmail.com posted in from http://code.google.com/p/droidsshd/issues/detail?id=1
parent 7ac0c00c
No related branches found
No related tags found
No related merge requests found
File added
Loading
Loading
@@ -223,6 +223,24 @@ public class InitialSetup extends Activity {
+ Base.DROPBEAR_BIN_KEY);
Util.symlink(path, Base.getDropbearBinDirPath() + "/"
+ Base.DROPBEAR_BIN_SCP);
String sftppath = Base.getDropbearBinDirPath() + "/" + Base.DROPBEAR_BIN_SFTP;
try {
InputStream is = getAssets().open(Base.DROPBEAR_BIN_SFTP);
FileOutputStream os = new FileOutputStream(sftppath);
byte[] buffer = new byte[4096];
int count;
while ((count = is.read(buffer)) != -1) {
os.write(buffer, 0, count);
}
is.close();
os.close();
} catch (IOException e) {
Log.e(TAG, "Exception when copying asset sftp-server: ", e);
e.printStackTrace();
return false;
}
Util.chmod(sftppath, 0755);
return true;
}
 
Loading
Loading
Loading
Loading
@@ -39,6 +39,7 @@ public class Base {
public static final String DROPBEAR_BIN_SRV = "dropbear";
public static final String DROPBEAR_BIN_KEY = "dropbearkey";
public static final String DROPBEAR_BIN_SCP = "scp";
public static final String DROPBEAR_BIN_SFTP = "sftp-server";
public static final int DAEMON_STATUS_UNKNOWN = -1;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment