Some Android related hacks

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Mar 6 07:15:44 WST 2012


Hello,
I don't know if any of you ever tried to compile
against the Android NDK, but attached is the changes
I made to get something slightly useful.
These are really 3 completely independent changes.
1) common-session.c: Android may return NULL as
the account password instead of "".
Since the current code crashes that might be
a good idea.
Possibly it might even make sense to change
m_strdup to return strdup("") when the input
is NULL.

2) loginrec.c: Android defines USER_PROCESS but not
DEAD_PROCESS. No idea what a sensible solution is.

3) sshpty.c: The /dev/ptmx code actually works fine
on Android (as far as I can tell), as long as you disable
the I_PUSH stuff which doesn't compile.
Since the USE_DEV_PTMX auto-detection is quite conservative
checking whether I_PUSH is defined seemed quite reasonable
to me.

4) svr-auth.c: Allow disabling the valid shell check.
It just prints a lot of warnings that the related
libc functions are only stubs and always fails on
Android.

Hope parts of it are acceptable for inclusion,
would be nice if all those Android-dropbox forks
would have fewer custom changes.

Kind regards,
Reimar Döffinger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: andhacks.diff
Type: text/x-diff
Size: 1722 bytes
Desc: not available
Url : http://lists.ucc.gu.uwa.edu.au/pipermail/dropbear/attachments/20120306/1401d703/attachment.diff 


More information about the Dropbear mailing list