--- defs.h.orig	2011-08-03 08:31:21.000000000 +0200
+++ defs.h	2011-08-03 08:21:02.000000000 +0200
@@ -19,6 +19,10 @@
 #define SHADOW_FILE "/etc/shadow"
 #define MAXLEN 1024
 
+// crypt method is SHA-512 (supported since GLIBC-2.7)
+char crypt_method[]="$6$";
+
+
 void changesmbpass(char *form_user, char *form_newpw1, int buflen);
 void changesquidpass(char *form_user, char *form_newpw1, int buflen);
 void clean_up(int quit);
--- changepassword.c.orig	2011-08-03 08:07:13.000000000 +0200
+++ changepassword.c	2011-08-03 08:30:55.000000000 +0200
@@ -16,6 +16,7 @@
  * release 0.8 on 2004-09-01 by Vinicius Souza
  * release 0.9 on 2005-01-08 by Vinicius Souza
  * release 0.91 on 2008-03-12 by Alexander Noack -- changed /etc/shadow group to "shadow"
+ * release 0.92 on 2011-08-03 by Alexander Noack -- ENCRYPT_METHOD is now SHA-512 with salt
  *
  * Parts of the program are taken from:
  *    frgpasswd.c		by Knut Grahlmann <Knut.Grahlmann@bigfoot.com>
@@ -234,8 +235,10 @@
 	clean_up(1);
 }
 
-// crypt new password with MD5 hash
-sd_list->sp_pwdp=crypt(form_newpw1,"$1$");
+// crypt new password with SHA-512 hash
+strcat(crypt_method,salt);
+strcat(crypt_method,"$");
+sd_list->sp_pwdp=crypt(form_newpw1,crypt_method);
 
 // minimun number of days between changes
 sd_list->sp_min=PWD_MIN_DAYS;

