Hello,

since the current Ubuntu LTS release switched to the sha512-based
crypt() key derivation function for new /etc/shadow passwords, here's a
small patch for Radiator to work with them.

Best regards,
        Wolfgang Miedl

-- 
Wolfgang Miedl     <[email protected]>   Tel (+43-1) 58801 - 42057
Information Technology Services                      Communication Group
University of Technology Vienna                                  Austria
http://pgpkeys.tuwien.ac.at/                              PGP Key wmiedl

--- AuthGeneric.pm.old	2011-08-05 15:04:44.463919975 +0200
+++ AuthGeneric.pm	2011-08-05 16:07:51.374540458 +0200
@@ -1363,6 +1363,14 @@
 	# Linux standard MD5 encryption
 	$result = (&Radius::Util::md5crypt($submitted_pw, $pw) eq $pw);
     }
+	 elsif ($pw =~ /^\$6\$/) 
+	 {
+		 # Linux SHA512 crypt
+		 # Get salt
+		 if ($pw =~ /^\$6\$([^\$]{0,8})\$(.*)$/) {
+		 	$result = crypt($submitted_pw, '$6$'.$1) eq $pw;
+		 }
+	 }
     elsif ($submitted_pw =~ /^Digest/i)
     {
 	# Digest authentication from a web server or proxy

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
radiator mailing list
[email protected]
http://www.open.com.au/mailman/listinfo/radiator

Reply via email to