bugzilla-daemon at mindrot.org
2013-Jun-01 19:28 UTC
[Bug 2112] New: Android doesn't provide an implementation of crypt().
https://bugzilla.mindrot.org/show_bug.cgi?id=2112 Bug ID: 2112 Summary: Android doesn't provide an implementation of crypt(). Product: Portable OpenSSH Version: 6.2p1 Hardware: Other OS: Linux Status: NEW Severity: minor Priority: P5 Component: Build system Assignee: unassigned-bugs at mindrot.org Reporter: nathan.osman at gmail.com Created attachment 2284 --> https://bugzilla.mindrot.org/attachment.cgi?id=2284&action=edit Use OpenSSL DES_crypt function as a drop-in replacement for crypt(). The Android platform does not provide a crypt() function (crypt.h does not exist) and therefore the following error is produced when attempting to link xcrypt.o from the openbsd-compat library: libopenbsd-compat.a(xcrypt.o): in function xcrypt:xcrypt.c:78: error: undefined reference to 'crypt' However, OpenSSL includes an implementation of crypt in the libcrypto library. I have attached a small patch that: - checks if crypt.h is available - if not, checks if openssl is available - uses a #define to point crypt to DES_crypt -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2013-Jun-01 19:31 UTC
[Bug 2112] Android doesn't provide an implementation of crypt().
https://bugzilla.mindrot.org/show_bug.cgi?id=2112 --- Comment #1 from Nathan Osman <nathan.osman at gmail.com> --- Actually I made a mistake in describing my patch - the first two steps are reversed. First a check for OpenSSL is made and then DES_crypt is used only if crypt is missing. I wasn't sure which order to do things in. I can reverse the '#if defined' lines if needed. -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2013-Jun-01 19:53 UTC
[Bug 2112] Android doesn't provide an implementation of crypt().
https://bugzilla.mindrot.org/show_bug.cgi?id=2112 --- Comment #2 from Darren Tucker <dtucker at zip.com.au> --- Comment on attachment 2284 --> https://bugzilla.mindrot.org/attachment.cgi?id=2284 Use OpenSSL DES_crypt function as a drop-in replacement for crypt().>+# if defined(HAVE_OPENSSL)openssl is mandatory so there's no point checking for this (I'm not sure why configure even sets it).>+# if !defined(HAVE_CRYPT_H)you don't really care whether or not crypt.h exists, what you really care about is whether or not you have a crypt function, so that's what you should be checking for. I'll attach a modified patch shortly. -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2013-Jun-01 20:07 UTC
[Bug 2112] Android doesn't provide an implementation of crypt().
https://bugzilla.mindrot.org/show_bug.cgi?id=2112 Darren Tucker <dtucker at zip.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dtucker at zip.com.au Attachment #2284|0 |1 is obsolete| | --- Comment #3 from Darren Tucker <dtucker at zip.com.au> --- Created attachment 2288 --> https://bugzilla.mindrot.org/attachment.cgi?id=2288&action=edit Use OpenSSL DES_crypt function as a drop-in replacement for crypt(). Please try this. note that you'll need to run "autoreconf" to rebuild configure before running ./configure. -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2013-Jun-01 20:07 UTC
[Bug 2112] Android doesn't provide an implementation of crypt().
https://bugzilla.mindrot.org/show_bug.cgi?id=2112 Darren Tucker <dtucker at zip.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |2076 -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2013-Jun-01 20:24 UTC
[Bug 2112] Android doesn't provide an implementation of crypt().
https://bugzilla.mindrot.org/show_bug.cgi?id=2112 --- Comment #4 from Nathan Osman <nathan.osman at gmail.com> --- I applied the patch on a clean copy of the OpenSSH source code and can confirm that it solves the problem. Thanks! -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2013-Jun-01 20:28 UTC
[Bug 2112] Android doesn't provide an implementation of crypt().
https://bugzilla.mindrot.org/show_bug.cgi?id=2112 Darren Tucker <dtucker at zip.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Darren Tucker <dtucker at zip.com.au> --- Patch applied, thanks. -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2015-Aug-11 13:05 UTC
[Bug 2112] Android doesn't provide an implementation of crypt().
https://bugzilla.mindrot.org/show_bug.cgi?id=2112 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Damien Miller <djm at mindrot.org> --- Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1 -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.