diff svr-authpasswd.c @ 676:0edf08895a33

Return immediate success for blank passwords if allowed
author Matt Johnston <matt@ucc.asn.au>
date Wed, 09 May 2012 22:37:04 +0800
parents d40f3cc47aed
children 55b84e59aaad
line wrap: on
line diff
--- a/svr-authpasswd.c	Wed May 09 21:09:34 2012 +0800
+++ b/svr-authpasswd.c	Wed May 09 22:37:04 2012 +0800
@@ -36,9 +36,6 @@
  * appropriate */
 void svr_auth_password() {
 	
-#ifdef HAVE_SHADOW_H
-	struct spwd *spasswd = NULL;
-#endif
 	char * passwdcrypt = NULL; /* the crypt from /etc/passwd or /etc/shadow */
 	char * testcrypt = NULL; /* crypt generated from the user's password sent */
 	unsigned char * password;
@@ -48,13 +45,6 @@
 	unsigned int changepw;
 
 	passwdcrypt = ses.authstate.pw_passwd;
-#ifdef HAVE_SHADOW_H
-	/* get the shadow password if possible */
-	spasswd = getspnam(ses.authstate.pw_name);
-	if (spasswd != NULL && spasswd->sp_pwdp != NULL) {
-		passwdcrypt = spasswd->sp_pwdp;
-	}
-#endif
 
 #ifdef DEBUG_HACKCRYPT
 	/* debugging crypt for non-root testing with shadows */