aboutsummaryrefslogtreecommitdiffstats
path: root/auth1.c
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@google.com>2011-12-28 14:12:50 -0500
committerMike Lockwood <lockwood@google.com>2012-02-08 10:12:53 -0800
commit1b6cc98e30329f380546d5f22b1c9c975e3df4f8 (patch)
treec62a60fd316e4812ce6ca453efad71733e668df0 /auth1.c
parentd62cf1eb84c245692d63a45c9ef71583bd2bfda1 (diff)
downloadplatform_external_openssh-1b6cc98e30329f380546d5f22b1c9c975e3df4f8.tar.gz
platform_external_openssh-1b6cc98e30329f380546d5f22b1c9c975e3df4f8.tar.bz2
platform_external_openssh-1b6cc98e30329f380546d5f22b1c9c975e3df4f8.zip
Initial port of openssh to android
Operation instructions: start from init.rc using start-ssh script Add your public key to /data/ssh/authorized_keys login with "ssh shell@<ip address>" from another computer on same network Change-Id: I1085a8b2f2766d4a2a4a70ffaf0352b07c261281 Signed-off-by: Mike Lockwood <lockwood@google.com>
Diffstat (limited to 'auth1.c')
-rw-r--r--auth1.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/auth1.c b/auth1.c
index cc85aec7..8df9d8b4 100644
--- a/auth1.c
+++ b/auth1.c
@@ -127,8 +127,14 @@ auth1_process_password(Authctxt *authctxt, char *info, size_t infolen)
packet_check_eom();
/* Try authentication with the password. */
+#ifndef ANDROID
authenticated = PRIVSEP(auth_password(authctxt, password));
+#else
+ /* no password authentication in android */
+ authenticated = 0;
+#endif
+
memset(password, 0, dlen);
xfree(password);
@@ -243,12 +249,16 @@ do_authloop(Authctxt *authctxt)
debug("Attempting authentication for %s%.100s.",
authctxt->valid ? "" : "invalid user ", authctxt->user);
+ /* no password authentication in android */
+#ifndef ANDROID
/* If the user has no password, accept authentication immediately. */
if (options.permit_empty_passwd && options.password_authentication &&
#ifdef KRB5
(!options.kerberos_authentication || options.kerberos_or_local_passwd) &&
#endif
- PRIVSEP(auth_password(authctxt, ""))) {
+ PRIVSEP(auth_password(authctxt, "")))
+#endif
+ {
#ifdef USE_PAM
if (options.use_pam && (PRIVSEP(do_pam_account())))
#endif