Bugzilla – Attachment 2157 Details for
Bug 2012
build for Android platform
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
use fake&NULL for passwords
0002-android-use-fake-NULL-for-passwords.patch (text/plain), 1.75 KB, created by
Roumen Petrov
on 2012-05-26 05:38:11 AEST
(
hide
)
Description:
use fake&NULL for passwords
Filename:
MIME Type:
Creator:
Roumen Petrov
Created:
2012-05-26 05:38:11 AEST
Size:
1.75 KB
patch
obsolete
>From 4caa8a7c7cd1be3b18a3fee9c038cdcaa6ba003b Mon Sep 17 00:00:00 2001 >From: Roumen Petrov <openssh@roumenpetrov.info> >Date: Sat, 31 Mar 2012 22:33:46 +0300 >Subject: [PATCH 2/2] android: use fake&NULL for passwords > >--- > misc.c | 7 +++++++ > openbsd-compat/xcrypt.c | 11 +++++++++++ > 2 files changed, 18 insertions(+), 0 deletions(-) > >diff --git a/misc.c b/misc.c >index f6d6c8e..d086991 100644 >--- a/misc.c >+++ b/misc.c >@@ -205,7 +205,14 @@ pwcopy(struct passwd *pw) > struct passwd *copy = xcalloc(1, sizeof(*copy)); > > copy->pw_name = xstrdup(pw->pw_name); >+#if defined(__ANDROID__) >+ /* FIXME: password is NULL on Android */ >+ copy->pw_passwd = xstrdup(pw->pw_passwd ? pw->pw_passwd : >+ /* fake password from auth.c */ >+ "$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK"); >+#else > copy->pw_passwd = xstrdup(pw->pw_passwd); >+#endif > #ifdef HAVE_STRUCT_PASSWD_PW_GECOS > copy->pw_gecos = xstrdup(pw->pw_gecos); > #endif >diff --git a/openbsd-compat/xcrypt.c b/openbsd-compat/xcrypt.c >index 6291e28..111d47a 100644 >--- a/openbsd-compat/xcrypt.c >+++ b/openbsd-compat/xcrypt.c >@@ -53,6 +53,14 @@ > # include <pwdadj.h> > # endif > >+# if defined(__ANDROID__) >+# include <sys/limits.h> >+# if _XOPEN_CRYPT == -1 >+ /* FIXME: to update configure script */ >+# undef HAVE_MD5_PASSWORDS >+# endif >+# endif >+ > # if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) > # include "md5crypt.h" > # endif >@@ -74,6 +82,9 @@ xcrypt(const char *password, const char *salt) > crypted = crypt(password, salt); > # elif defined(HAVE_SECUREWARE) > crypted = bigcrypt(password, salt); >+# elif defined(__ANDROID__) >+ /* FIXME: password is NULL on Android */ >+ crypted = NULL; > # else > crypted = crypt(password, salt); > # endif >-- >1.7.4.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2012
:
2156
| 2157