aboutsummaryrefslogtreecommitdiffstats
path: root/main/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch
blob: 8abb818f5146d46df2e7840848a29674c2448b3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff --git a/conf/config.inc.php b/conf/config.inc.php
index 1aae0f6..f78da93 100644
--- a/conf/config.inc.php
+++ b/conf/config.inc.php
@@ -59,6 +59,9 @@ $shadow_options['update_shadowLastChange'] = false;
 # This option is not used with ad_mode = true
 $hash = "SSHA";
 
+# prefix to use for salt with CRYPT
+$crypt_salt_prefix = "$6$";
+
 # Local password policy
 # This is applied before directory password policy
 # Minimal length
diff --git a/lib/functions.inc.php b/lib/functions.inc.php
index 03e7258..1870692 100644
--- a/lib/functions.inc.php
+++ b/lib/functions.inc.php
@@ -62,7 +62,7 @@ function make_crypt_password($password) {
     while( strlen( $salt ) < 2 )
 		$salt .= substr( $possible, ( rand() % strlen( $possible ) ), 1 );
 
-    $hash = '{CRYPT}' . crypt( $password,  $salt);
+    $hash = '{CRYPT}' . crypt( $password,  $GLOBALS['crypt_salt_prefix'].$salt);
     return $hash;
 }