mirror of
http://galexander.org/git/simplesshd.git
synced 2025-01-16 01:50:54 +00:00
actually call main...
This commit is contained in:
parent
1febe9ebe9
commit
bfa3c99dc0
@ -23,5 +23,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define DROPBEAR_SERVER 1
|
#define DROPBEAR_SERVER 1
|
||||||
|
#define DBMULTI_dropbear 1
|
||||||
|
#define DROPBEAR_MULTI 1
|
||||||
|
|
||||||
#endif /* __CONFIG_H__ */
|
#endif /* __CONFIG_H__ */
|
||||||
|
@ -11,6 +11,8 @@ static jclass cl_string;
|
|||||||
static jclass cl_simplesshdservice;
|
static jclass cl_simplesshdservice;
|
||||||
static jfieldID fid_sss_sshd_pid;
|
static jfieldID fid_sss_sshd_pid;
|
||||||
|
|
||||||
|
extern int dropbear_main(int argc, char **argv);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
jni_init(JNIEnv *env_)
|
jni_init(JNIEnv *env_)
|
||||||
{
|
{
|
||||||
@ -65,7 +67,8 @@ Java_org_galexander_sshd_SimpleSSHDService_start_1sshd(JNIEnv *env_,
|
|||||||
|
|
||||||
pid = fork();
|
pid = fork();
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
/* XXX - call dropbear main() */
|
char *argv[2] = { "sshd", NULL };
|
||||||
|
dropbear_main(1, argv);
|
||||||
} else {
|
} else {
|
||||||
(*env)->SetStaticIntField(env, cl_simplesshdservice,
|
(*env)->SetStaticIntField(env, cl_simplesshdservice,
|
||||||
fid_sss_sshd_pid, pid);
|
fid_sss_sshd_pid, pid);
|
||||||
|
Loading…
Reference in New Issue
Block a user