From de7f8c196a9197877bde53f5cab4580765a32e8c Mon Sep 17 00:00:00 2001 From: Leonardo Arena Date: Tue, 12 Aug 2014 07:43:28 +0000 Subject: main/ltb-project-ssp: add option for algorythm selection for crypt hashes http://tools.lsc-project.org/issues/719 --- .../ssp-0.8-add-crypt-algorithm-option.patch | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 main/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch (limited to 'main/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch') diff --git a/main/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch b/main/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch new file mode 100644 index 0000000000..cebb918a92 --- /dev/null +++ b/main/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch @@ -0,0 +1,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, $crypt_salt_prefix.$salt); + return $hash; + } + -- cgit v1.2.3