The unified diff between revisions [4cbdd6e0..] and [4c883eb4..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'svr-chansession.c'
# # # patch "svr-chansession.c" # from [ab83b6c177a51cefc83b038932c9fc1e9b296692] # to [248542573188674e77293507ac3a23b081041f56] # ============================================================ --- svr-chansession.c ab83b6c177a51cefc83b038932c9fc1e9b296692 +++ svr-chansession.c 248542573188674e77293507ac3a23b081041f56 @@ -623,7 +623,12 @@ static int noptycommand(struct Channel * if (pipe(errfds) != 0) return DROPBEAR_FAILURE; +#ifdef __uClinux__ + pid = vfork(); +#else pid = fork(); +#endif + if (pid < 0) return DROPBEAR_FAILURE; @@ -714,7 +719,11 @@ static int ptycommand(struct Channel *ch return DROPBEAR_FAILURE; } +#ifdef __uClinux__ + pid = vfork(); +#else pid = fork(); +#endif if (pid < 0) return DROPBEAR_FAILURE; @@ -828,12 +837,16 @@ static void execchild(struct ChanSess *c char * baseshell = NULL; unsigned int i; + /* with uClinux we'll have vfork()ed, so don't want to overwrite the + * hostkey. can't think of a workaround to clear it */ +#ifndef __uClinux__ /* wipe the hostkey */ sign_key_free(svr_opts.hostkey); svr_opts.hostkey = NULL; /* overwrite the prng state */ - seedrandom(); + reseedrandom(); +#endif /* close file descriptors except stdin/stdout/stderr * Need to be sure FDs are closed here to avoid reading files as root */