aboutsummaryrefslogtreecommitdiffstats
path: root/community
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
parentfc787e8f39e919ca99c1912a63642c4ee9947408 (diff)
downloadaports-df7f237af42a284db04d702a9ab9067a46d82a95.tar.bz2
aports-df7f237af42a284db04d702a9ab9067a46d82a95.tar.xz
community/ltb-project-ssp: moved from main
Diffstat (limited to 'community')
-rw-r--r--community/ltb-project-ssp/APKBUILD52
-rw-r--r--community/ltb-project-ssp/ltb-project-ssp-move-config-location.patch11
-rw-r--r--community/ltb-project-ssp/ssp-0.8-add-crypt-algorithm-option.patch27
3 files changed, 90 insertions, 0 deletions
diff --git a/community/ltb-project-ssp/APKBUILD b/community/ltb-project-ssp/APKBUILD
new file mode 100644
index 0000000000..097e594354
--- /dev/null
+++ b/community/ltb-project-ssp/APKBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Leonardo Arena
+pkgname="ltb-project-ssp"
+_realname="ltb-project-self-service-password"
+pkgver="0.8"
+pkgrel=4
+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"
+license="GPL"
+depends="php php-ldap php-mcrypt"
+depends_dev=
+makedepends="$depends_dev"
+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
+ "
+
+
+_builddir="$srcdir"/$_realname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ return 0
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/etc/ltb-project/ssp
+ mkdir -p "$pkgdir"/usr/share/webapps/ltb-project/ssp
+ mv conf "$pkgdir"/etc/ltb-project/ssp
+ cp -r * "$pkgdir"/usr/share/webapps/ltb-project/ssp
+}
+
+md5sums="3132329678221221f9b8e94b8de3b360 ltb-project-self-service-password-0.8.tar.gz
+fd4c36fda7ed90cb11d242bc1139853b ltb-project-ssp-move-config-location.patch
+b7ba10bd033b3d9cb10269d4dee8c467 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
+34f23f1a90aba6f20ae3f1018512f6d413c6779eaf0dd65b795d99220b394925 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
+43f4e0e82a396c8caeeeb41d18d14886c051ccb18d061081f7c84f8bbe9b8a15d618e2a02480483659b04a82218408b71557acc6414731695f0f691c3cdce232 ssp-0.8-add-crypt-algorithm-option.patch"
diff --git a/community/ltb-project-ssp/ltb-project-ssp-move-config-location.patch b/community/ltb-project-ssp/ltb-project-ssp-move-config-location.patch
new file mode 100644
index 0000000000..a7f0df7128
--- /dev/null
+++ b/community/ltb-project-ssp/ltb-project-ssp-move-config-location.patch
@@ -0,0 +1,11 @@
+--- a/index.php
++++ b/index.php
+@@ -22,7 +22,7 @@
+ #==============================================================================
+ # Includes
+ #==============================================================================
+-require_once("conf/config.inc.php");
++require_once("/etc/ltb-project/ssp/conf/config.inc.php");
+ require_once("lib/functions.inc.php");
+ if ($use_recaptcha) {
+ require_once("lib/recaptchalib.php");
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;
+ }
+