aboutsummaryrefslogtreecommitdiffstats
path: root/community/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2015-10-06 07:22:34 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2015-10-06 07:22:34 +0000
commitdf7f237af42a284db04d702a9ab9067a46d82a95 (patch)
treead5515e79c0b6eb8d62d35f32c85ef92d025bfd1 /community/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch
parentfc787e8f39e919ca99c1912a63642c4ee9947408 (diff)
downloadaports-df7f237af42a284db04d702a9ab9067a46d82a95.tar.bz2
aports-df7f237af42a284db04d702a9ab9067a46d82a95.tar.xz
community/ltb-project-ssp: moved from main
Diffstat (limited to 'community/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch')
-rw-r--r--community/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/community/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch b/community/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch
new file mode 100644
index 0000000000..8abb818f51
--- /dev/null
+++ b/community/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, $GLOBALS['crypt_salt_prefix'].$salt);
+ return $hash;
+ }
+