aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2014-08-12 07:43:28 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2014-08-12 07:43:28 +0000
commitde7f8c196a9197877bde53f5cab4580765a32e8c (patch)
tree00ddb96fe45407f93693a087126fe62e659e4516
parentbc12563552b622d46252ff825c96e271da232595 (diff)
downloadaports-de7f8c196a9197877bde53f5cab4580765a32e8c.tar.bz2
aports-de7f8c196a9197877bde53f5cab4580765a32e8c.tar.xz
main/ltb-project-ssp: add option for algorythm selection for crypt hashes
http://tools.lsc-project.org/issues/719
-rw-r--r--main/ltb-project-ssp/APKBUILD12
-rw-r--r--main/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch27
2 files changed, 35 insertions, 4 deletions
diff --git a/main/ltb-project-ssp/APKBUILD b/main/ltb-project-ssp/APKBUILD
index c3fbcd4d92..967586388c 100644
--- a/main/ltb-project-ssp/APKBUILD
+++ b/main/ltb-project-ssp/APKBUILD
@@ -2,7 +2,7 @@
pkgname="ltb-project-ssp"
_realname="ltb-project-self-service-password"
pkgver="0.8"
-pkgrel=2
+pkgrel=3
pkgdesc="PHP application that allows users to change their password in an LDAP directory"
url="http://ltb-project.org/wiki/documentation/self-service-password"
arch="noarch"
@@ -14,6 +14,7 @@ install=
subpackages=
source="http://tools.ltb-project.org/attachments/download/497/$_realname-$pkgver.tar.gz
ltb-project-ssp-move-config-location.patch
+ ssp-0.8-add-crypt-algorithm-option.patch
"
@@ -41,8 +42,11 @@ package() {
}
md5sums="3132329678221221f9b8e94b8de3b360 ltb-project-self-service-password-0.8.tar.gz
-fd4c36fda7ed90cb11d242bc1139853b ltb-project-ssp-move-config-location.patch"
+fd4c36fda7ed90cb11d242bc1139853b ltb-project-ssp-move-config-location.patch
+a94dc152a2047477a512cb9836234c5f ssp-0.8-add-crypt-algorithm-option.patch"
sha256sums="e26d299ed6d2352056d545c3c5c826d296ff7a6152434db25196982dc14359d3 ltb-project-self-service-password-0.8.tar.gz
-f5cb978e5d45e09bf9923af8e337c7385448b350060a01f26eb9d061a1524340 ltb-project-ssp-move-config-location.patch"
+f5cb978e5d45e09bf9923af8e337c7385448b350060a01f26eb9d061a1524340 ltb-project-ssp-move-config-location.patch
+9767aa309e07d61f2cc9afdf06979c429e425be7c2adee63e1043e2981e42dbc ssp-0.8-add-crypt-algorithm-option.patch"
sha512sums="3586ba46b35badc37fbd562d884c9cd1f21527c31458231ed3af6848e919d9072251e11cbbdbf583f39901c6e37c85223be2682c0821d1553cba6911c339e6c7 ltb-project-self-service-password-0.8.tar.gz
-70151388b681a6af43d0861f3741ecf2573f1c9f4f79258bb7f66e54cd80ca57f895f371f5e1369c424f5a2059a406c90f8ad3ce3245357e5d2b51edf578826c ltb-project-ssp-move-config-location.patch"
+70151388b681a6af43d0861f3741ecf2573f1c9f4f79258bb7f66e54cd80ca57f895f371f5e1369c424f5a2059a406c90f8ad3ce3245357e5d2b51edf578826c ltb-project-ssp-move-config-location.patch
+bd36666f66892128af8fa9b7c3fd57e4d315ea24d356ff3f3c5a7895232370239e3bea27a6701d67525be4241837c94135abda5a834f2cf217edef740adf5b30 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;
+ }
+