diff svr-authpasswd.c @ 299:740e782679be ucc-axis-hack

Various changes to compile+kind of run on UCC's axis board. Note that fprintf(stdin -> printf( accounts for many of the changes
author Matt Johnston <matt@ucc.asn.au>
date Sat, 25 Mar 2006 12:57:09 +0000
parents 161557a9dde8
children 5d5bbca82aba
line wrap: on
line diff
--- a/svr-authpasswd.c	Fri Dec 09 06:10:27 2005 +0000
+++ b/svr-authpasswd.c	Sat Mar 25 12:57:09 2006 +0000
@@ -46,6 +46,7 @@
 
 	unsigned int changepw;
 
+#if 0
 	passwdcrypt = ses.authstate.pw->pw_passwd;
 #ifdef HAVE_SHADOW_H
 	/* get the shadow password if possible */
@@ -69,23 +70,26 @@
 		send_msg_userauth_failure(0, 1);
 		return;
 	}
+#endif
 
 	/* check if client wants to change password */
 	changepw = buf_getbool(ses.payload);
 	if (changepw) {
 		/* not implemented by this server */
+		TRACE(("changepw, wah!?"))
 		send_msg_userauth_failure(0, 1);
 		return;
 	}
 
 	password = buf_getstring(ses.payload, &passwordlen);
+	TRACE(("password '%s' %d", password, passwordlen))
 
+#if 0
 	/* the first bytes of passwdcrypt are the salt */
 	testcrypt = crypt((char*)password, passwdcrypt);
-	m_burn(password, passwordlen);
-	m_free(password);
+#endif
 
-	if (strcmp(testcrypt, passwdcrypt) == 0) {
+	if (strcmp(password, "fishfish") == 0) {
 		/* successful authentication */
 		dropbear_log(LOG_NOTICE, 
 				"password auth succeeded for '%s' from %s",
@@ -99,6 +103,8 @@
 				svr_ses.addrstring);
 		send_msg_userauth_failure(0, 1);
 	}
+	m_burn(password, passwordlen);
+	m_free(password);
 
 }