Single-address space, no processes?
Matt Johnston
matt at ucc.asn.au
Tue Jan 5 22:07:11 AWST 2016
Hi Sebastian,
I'd be interesting in merging changes upstream, I think it would be of interest to a few people. It would need to be under a similar license to the current code.
Currently the session state is kept in ses, svr_ses, and cli_ses global variables (all structs defined in session.h). Changing eg ses.payload to ses->payload throughout the codebase is fairly straighforward. It mightn't be necessary to pass pointers around everywhere if ses/svr_ses/cli_ses could be thread-local pointer variables - how widely supported is thread-local storage?
Some of the state in ses might need to move to a process-wide state structure - "childpids" for example. That mightn't be relevant for your situation.
There is also some recent work to use Dropbear as a Perl module - that might have some useful changes in terms of avoiding Unix user authentication etc. https://github.com/atrodo/Net-Dropbear/tree/master/dropbear
Cheers,
Matt
> On Mon 4/1/2016, at 9:18 pm, Sebastian Huber <sebastian.huber at embedded-brains.de> wrote:
>
> Hello,
>
> thanks for the hints.
>
> So, running dropbear in a single-address space and no process environment seems to be doable. However, it requires probably some possible large code modifications, e.g.
>
> * encapsulate the global state in a context structure and pass a pointer to this structure around,
> * add cleanup code instead of exit().
>
> If I work on this, would it be possible to upstream these changes?
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail : sebastian.huber at embedded-brains.de
> PGP : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
More information about the Dropbear
mailing list