Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (f4f70fe8ff8e6c1813ccd835097a70e8df08e332)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (f4f70fe8ff8e6c1813ccd835097a70e8df08e332)
  • Date: Fri, 22 Jun 2012 16:53:00 -0500

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

collab/openldap/BUILD | 43 +++--
collab/openldap/CONFIGURE | 200 ++++++++++++++++++++------
collab/openldap/DEPENDS | 127 +++++++++-------
collab/openldap/DETAILS | 11 -
collab/openldap/HISTORY | 18 ++
collab/openldap/PREPARE | 4
collab/openldap/PRE_BUILD | 2
collab/openldap/PRE_SUB_DEPENDS | 2
collab/openldap/SUB_DEPENDS | 2
collab/openldap/TRIGGERS | 5
collab/openldap/UP_TRIGGERS | 8 -
collab/openldap/openldap-2.4-ntlm.patch | 203 --------------------------
collab/openldap/openldap-2.4.31-ntlm.patch | 219
+++++++++++++++++++++++++++++
13 files changed, 503 insertions(+), 341 deletions(-)

New commits:
commit a46ba0639da51ccb0085f9e37d63b28637ab3052
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

openldap: refactured the spell

diff --git a/collab/openldap/BUILD b/collab/openldap/BUILD
index 101e5cd..2f0dc8d 100755
--- a/collab/openldap/BUILD
+++ b/collab/openldap/BUILD
@@ -6,31 +6,34 @@ if is_depends_enabled $SPELL db; then
LDFLAGS="-ldb $LDFLAGS"
fi &&

-# only add slapd options when actually building it
-if echo $OPENLDAP_SLAPD | grep -q enable; then
+if is_depends_enabled $SPELL nss; then
+ CPPFLAGS="-I$INSTALL_ROOT/usr/include/nss \
+ -I$INSTALL_ROOT/usr/include/nspr \
+ $CPPFLAGS"
+fi &&

- if [[ "${SLAPD_OVERLAYS}" == 'none' ]]; then
- message 'skipping overlays'
- elif [[ "${SLAPD_OVERLAYS}" == 'all' ]]; then
- message 'adding all overlays' &&
- OVERLAYS='--enable-overlays=mod'
+if list_find "$OPENLDAP_OPTS" "--disable-slapd"; then
+ OPTS="--disable-backends \
+ --disable-overlays \
+ $OPTS"
+else
+ if list_find "$SLAPD_OVERLAYS" "all"; then
+ OPTS="--enable-overlays=mod $OPTS"
+ elif list_find "$SLAPD_OVERLAYS" "none"; then
+ OPTS="--disable-overlays $OPTS"
else
- for OVERLAY in ${SLAPD_OVERLAYS}; do
- OVERLAYS="${OVERLAYS} --enable-${OVERLAY}=mod"
+ for o in $SLAPD_OVERLAYS; do
+ OPTS="--enable-${o}=mod $OPTS"
done
fi
-
- SLAPD_OPTS="$OPENLDAP_SLAPD $SLAPD_ACL $SLAPD_ACI $SLAPD_DNSSRV
- $SLAPD_MONITOR $SLAPD_CRYPT $SLAPD_CLEAR $SLAPD_REV
- $SLAPD_SOCK $SLAPD_META $SLAPD_RELAY $OVERLAYS"
-else
- SLAPD_OPTS="$OPENLDAP_SLAPD"
fi &&

-OPTS="$OPTS
- $SLAPD_OPTS
- --enable-shared --enable-static
- --enable-dynamic
- --enable-local" &&
+OPTS="--enable-static \
+ --enable-shared \
+ --enable-dynamic \
+ --enable-local \
+ --without-fetch \
+ $OPENLDAP_OPTS \
+ $OPTS" &&

default_build
diff --git a/collab/openldap/CONFIGURE b/collab/openldap/CONFIGURE
index 8ba29f9..8ea1eb8 100755
--- a/collab/openldap/CONFIGURE
+++ b/collab/openldap/CONFIGURE
@@ -1,57 +1,167 @@
source $GRIMOIRE/config_query_multi.function &&

-config_query_option OPENLDAP_SLAPD 'Build SLAPD, the standalone LDAP
daemon?' y \
- '--enable-slapd --enable-modules' '--disable-slapd' &&
-
-if echo $OPENLDAP_SLAPD | grep -q enable; then
- config_query_option SLAPD_DNSSRV 'Enable DNS backend? (LDAP server
locator)' n \
- '--enable-dnssrv=mod' '--disable-dnssrv' &&
- config_query_option SLAPD_META 'Enable metadirectory backend?' n \
- '--enable-meta=mod' '--disable-meta' &&
- config_query_option SLAPD_MONITOR 'Enable LDAP server monitor backend?' y \
- '--enable-monitor=mod' '--disable-monitor' &&
- config_query_option SLAPD_SOCK 'Enable sock backend?' n \
- '--enable-sock=mod' '--disable-sock' &&
- config_query_option SLAPD_RELAY 'Enable relay backend?' n \
- '--enable-relay=mod' '--disable-relay' &&
- config_query_option SLAPD_ACL 'Enable EXPERIMENTAL loadable ACL?' n \
- '--enable-dynacl' '--disable-dynacl' &&
- if echo $SLAPD_ACL|grep -q enable; then
- config_query_option SLAPD_ACI 'Enable per-object access control' n \
- '--enable-aci' '--disable-aci'
- fi &&
- config_query_option SLAPD_CLEAR 'Enable cleartext passwords?' y \
- '--enable-cleartext' '--disable-cleartext' &&
- config_query_option SLAPD_CRYPT 'Enable crypt passwords?' n \
- '--enable-crypt' '--disable-crypt' &&
- config_query_option SLAPD_REV 'Enable reverse lookup of client hostnames?'
n \
- '--enable-rlookups' '--disable-rlookups'
-fi &&
+config_query_option OPENLDAP_OPTS "Enable IPv6 support?" y \
+ "--enable-ipv6" \
+ "--disable-ipv6" &&

-config_query OPENLDAP_NTLM "Enable NTLM API support (needed for Evolution
Exchange plugin)?" n &&
+config_query_option OPENLDAP_OPTS "Enable proctitle support?" y \
+ "--enable-proctitle" \
+ "--disable-proctitle" &&
+
+config_query_option OPENLDAP_OPTS "Enable debugging?" y \
+ "--enable-debug" \
+ "--disable-debug" &&
+
+config_query_option OPENLDAP_OPTS "Enable threads support (not recommended
for shell backend in SLAPD)?" y \
+ "--with-threads" \
+ "--without-threads" &&

-config_query_multi SLAPD_OVERLAYS \
- "which overlays do you want supported?" \
- none all \
- accesslog auditlog collect constraint dds deref dyngroup \
- dynlist memberof ppolicy proxycache refint retcode rwm \
- seqmod sssvlv syncprov translucent unique valsort
-
-if list_find "$SLAPD_OVERLAYS" "all"; then
- SLAPD_OVERLAYS="all"
-elif list_find "$SLAPD_OVERLAYS" "none"; then
- SLAPD_OVERLAYS="none"
+if list_find "$OPENLDAP_OPTS" "--with-threads"; then
+ config_query_option OPENLDAP_OPTS "Enable implicitly yielding select?" y \
+ "--with-yielding-select=auto" \
+ "--without-yielding-select"
fi &&

-if echo $OPENLDAP_SLURPD |grep -q enable ; then
- if list_find "$SLAPD_OVERLAYS" "syncprov"; then
- message 'slurpd has been replaced by the syncprov overlay'
+config_query_list OPENLDAP_TLS "Which backend do you want for TLS/SSL
support?" \
+ none \
+ openssl \
+ gnutls \
+ moznss &&
+
+# backporting legacy options
+for o in OPENLDAP_SLAPD OPENLDAP_SLURPD SLAPD_DNSSRV SLAPD_META
SLAPD_MONITOR \
+ SLAPD_SOCK SLAPD_RELAY SLAPD_ACL SLAPD_ACI SLAPD_CLEAR SLAPD_CRYPT \
+ SLAPD_REV; do
+ if [[ -n ${!o} ]]; then
+ list_add "OPENLDAP_OPTS" "${!o}"
+ persistent_remove ${o}
+ fi
+done &&
+
+config_query_option OPENLDAP_OPTS 'Build SLAPD, the standalone LDAP daemon
(client-only otherwise)?' y \
+ '--enable-slapd --enable-modules' \
+ '--disable-slapd' &&
+
+if list_find "$OPENLDAP_OPTS" "--enable-slapd"; then
+ config_query_option OPENLDAP_OPTS 'Enable DNS backend (LDAP server
locator)?' n \
+ '--enable-dnssrv=mod' \
+ '--disable-dnssrv' &&
+
+ config_query_option OPENLDAP_OPTS 'Enable Memory-Mapped database backend?'
y \
+ '--enable-mdb=mod' \
+ '--disable-mdb' &&
+
+ config_query_option OPENLDAP_OPTS 'Enable LDAP backend?' n \
+ '--enable-ldap=mod' \
+ '--disable-ldap' &&
+
+ if list_find "$OPENLDAP_OPTS" "--enable-ldap=mod"; then
+ config_query_option OPENLDAP_OPTS 'Enable metadirectory backend?' n \
+ '--enable-meta=mod' \
+ '--disable-meta'
+ else
+ list_add "OPENLDAP_OPTS" "--disable-meta"
+ fi &&
+
+ config_query_option OPENLDAP_OPTS 'Enable LDAP server monitor backend?' y \
+ '--enable-monitor=mod' \
+ '--disable-monitor' &&
+
+ config_query_option OPENLDAP_OPTS 'Enable sock backend?' n \
+ '--enable-sock=mod' \
+ '--disable-sock' &&
+
+ config_query_option OPENLDAP_OPTS 'Enable relay backend?' y \
+ '--enable-relay=mod' \
+ '--disable-relay' &&
+
+ config_query_option OPENLDAP_OPTS 'Enable null backend?' n \
+ '--enable-null=mod' \
+ '--disable-null' &&
+
+ config_query_option OPENLDAP_OPTS 'Enable run-time loadable ACL support
(experimental)?' n \
+ '--enable-dynacl' \
+ '--disable-dynacl' &&
+
+ if list_find "$OPENLDAP_OPTS" "--enable-dynacl"; then
+ config_query_option OPENLDAP_OPTS 'Enable per-object access control
(experimental)?' n \
+ '--enable-aci' \
+ '--disable-aci'
+ fi &&
+
+ if [[ $OPENLDAP_TLS != none ]]; then
+ config_query_option OPENLDAP_OPTS 'Enable LAN Manager passwords?' n \
+ '--enable-lmpasswd' \
+ '--disable-lmpasswd'
+ fi &&
+
+ config_query_option OPENLDAP_OPTS 'Enable cleartext passwords?' y \
+ '--enable-cleartext' \
+ '--disable-cleartext' &&
+
+ config_query_option OPENLDAP_OPTS "Enable crypt(3)'ed passwords?" n \
+ "--enable-crypt" \
+ "--disable-crypt" &&
+
+ config_query_option OPENLDAP_OPTS 'Enable reverse lookup of client
hostnames?' n \
+ '--enable-rlookups' \
+ '--disable-rlookups' &&
+
+ config_query_option OPENLDAP_OPTS 'Enable SLAPI support (experimental)?' n
\
+ '--enable-slapi' \
+ '--disable-slapi' &&
+
+ config_query_multi SLAPD_OVERLAYS "Which overlays do you want supported?" \
+ none \
+ all \
+ accesslog \
+ auditlog \
+ collect \
+ constraint \
+ dds \
+ deref \
+ dyngroup \
+ dynlist \
+ memberof \
+ ppolicy \
+ proxycache \
+ refint \
+ retcode \
+ rwm \
+ seqmod \
+ sssvlv \
+ syncprov \
+ translucent \
+ unique \
+ valsort &&
+
+ if list_find "$OPENLDAP_OPTS" "--enable-meta" || list_find
"$SLAPD_OVERLAYS" "rwm"; then
+ list_add "OPENLDAP_OPTS" "--enable-rewrite"
else
- message 'slurpd has been replaced by the syncprov overlay, adding it' &&
- SLAPD_OVERLAYS="${SLAPD_OVERLAYS} syncprov"
+ config_query_option OPENLDAP_OPTS 'Enable DN rewriting?' y \
+ '--enable-rewrite=auto' \
+ '--disable-rewrite'
+ fi &&
+
+ # migrating slurpd to syncprov
+ if list_find "$OPENLDAP_OPTS" "--enable-slurpd"; then
+ if list_find "$SLAPD_OVERLAYS" "syncprov"; then
+ message 'slurpd has been replaced by the syncprov overlay'
+ else
+ message 'slurpd has been replaced by the syncprov overlay, adding it'
&&
+ list_add "SLAPD_OVERLAYS" "syncprov"
+ fi &&
+
+ list_remove "OPENLDAP_OPTS" "--enable-slurpd"
fi &&
- persistent_remove OPENLDAP_SLURPD
+
+ config_query_multi OPENLDAP_MP 'Which method do you want for multiple
precision statistics?' \
+ auto \
+ bignum \
+ gmp
fi &&

+config_query OPENLDAP_NTLM "Enable NTLM API support (needed for Evolution
Exchange plugin)?" n &&
+
message "${MESSAGE_COLOR}If you care about security, check out
http://timof.qipc.org/ldap/libldap.html .$DEFAULT_COLOR" &&
message "${MESSAGE_COLOR}The patch is not in the spell anymore because of
version mismatch...$DEFAULT_COLOR."
diff --git a/collab/openldap/DEPENDS b/collab/openldap/DEPENDS
index e3b7aa3..7840dd8 100755
--- a/collab/openldap/DEPENDS
+++ b/collab/openldap/DEPENDS
@@ -6,70 +6,85 @@ optional_depends SYSTEM-LOGGER \
'--disable-syslog' \
'for syslog support' &&

-# TODO add gnutls here if it works, preferably using PROVIDES
-optional_depends openssl \
- '--with-tls' \
- '--without-tls' \
- 'for SSL/TLS support' &&
+case $OPENLDAP_TLS in
+ none) OPTS="--without-tls $OPTS"
+ ;;
+ openssl) depends openssl "--with-tls=openssl"
+ ;;
+ gnutls) depends gnutls "--with-tls=gnutls"
+ ;;
+ moznss) depends nss "--with-tls=moznss" &&
+ depends nspr
+ ;;
+esac &&

-optional_depends cyrus-sasl '--with-cyrus-sasl' '--without-cyrus-sasl' \
- 'for SASL authentication, if SLAPD is a backend authenticator for SASL,
say "no"' &&
+optional_depends LIBSASL \
+ '--with-cyrus-sasl' \
+ '--without-cyrus-sasl' \
+ 'for SASL authentication, if SLAPD is a backend
authenticator for SASL, say "no"' &&

-if echo $OPENLDAP_SLAPD | grep -q enable; then
- optional_depends db '--enable-bdb=mod --enable-hdb=mod' \
- '--disable-bdb --disable-hdb' \
- 'for Berkeley DB backend (recommended)' &&
+if list_find "$OPENLDAP_OPTS" "--enable-slapd"; then
+ case OPENLDAP_MP in
+ auto) OPTS="--with-mp=auto $OPTS"
+ ;;
+ bignum) depends openssl "--with-mp=bignum"
+ ;;
+ gmp) depends gmp "--with-mp=gmp"
+ ;;
+ esac &&

- optional_depends ODBC-MGR \
- '--enable-sql=mod' \
- '--disable-sql' \
- 'for SQL backend (experimental)' &&
- if [[ $(get_spell_provider $SPELL ODBC-MGR) ]]; then
- if is_depends_enabled $SPELL unixodbc; then
- depends unixodbc --with-odbc=unixodbc
- elif is_depends_enabled $SPELL libiodbc; then
- depends libiodbc --with-odbc=iodbc
- else
- message "${PROBLEM_COLOR}unknown ODBC provider selected, please update
spell${DEFAULT_COLOR}"
- fi
- fi &&
+ if is_depends_enabled $SPELL $(get_spell_provider $SPELL LIBSASL); then
+ config_query_option OPENLDAP_OPTS "Enable (Cyrus) SASL password
verification?" n \
+ "--enable-spasswd" \
+ "--disable-spasswd"
+ fi &&

- optional_depends MYSQL '--enable-mdb=mod' '--disable-mdb' \
- 'for MYSQL backend' &&
+ optional_depends openslp \
+ '--enable-slp' \
+ '--disable-slp' \
+ 'for SLPv2 support' &&

- if [[ $(get_spell_provider $SPELL MYSQL) ]]; then
- config_query_option SLAPD_NDB 'Enable MYSQL NDB cluster support?' n \
- '--enable-ndb=mod' '--disable-ndb'
- if echo $SLAPD_NDB |grep -q enable ; then
- if is_depends_enabled $SPELL mariadb; then
- depends -sub NDB mariadb
- elif is_depends_enabled $SPELL mysql; then
- depends -sub NDB mysql
- fi
- fi
- fi
+ optional_depends tcp_wrappers \
+ '--enable-wrappers' \
+ '--disable-wrappers' \
+ 'for TCP wrappers support' &&

- optional_depends perl \
- '--enable-perl=mod' \
- '--disable-perl' \
- 'for perl backend (write your own storage backend)' &&
+ optional_depends db \
+ '--enable-bdb=mod --enable-hdb=mod' \
+ '--disable-bdb --disable-hdb' \
+ 'for Berkeley DB backend (recommended)' &&

- optional_depends bash \
- '--enable-shell=mod' \
- '--disable-shell' \
- 'for shell backend (write your own storage backend)' &&
+ optional_depends ODBC-MGR \
+ '--enable-sql=mod' \
+ '--disable-sql' \
+ 'for SQL backend' &&

- optional_depends shadow \
- '--enable-passwd=mod' \
- '--disable-passwd' \
- 'for passwd backend (demo code, do not use)' &&
+ if is_depends_enabled $SPELL $(get_spell_provider $SPELL ODBC-MGR); then
+ case $(get_spell_provider $SPELL ODBC-MGR) in
+ libiodbc) depends libiodbc "--with-odbc=iodbc"
+ ;;
+ unixodbc) depends unixodbc "--with-odbc=unixodbc"
+ ;;
+ esac
+ fi &&

- optional_depends tcp_wrappers \
- '--enable-wrappers' \
- '--disable-wrappers' \
- 'for TCP wrappers support'
-fi &&
+ optional_depends -sub NDB MYSQL \
+ "--enable-ndb=mod" \
+ "--disable-ndb" \
+ "for MySQL/MariaDB NDB Cluster backend" &&

-if [[ "$OPENLDAP_CONTEXT" == y ]]; then
- depends autoconf
+ optional_depends perl \
+ '--enable-perl=mod' \
+ '--disable-perl' \
+ 'for Perl backend (write your own storage backend)' &&
+
+ optional_depends bash \
+ '--enable-shell=mod' \
+ '--disable-shell' \
+ 'for shell backend (write your own storage backend)' &&
+
+ optional_depends shadow \
+ '--enable-passwd=mod' \
+ '--disable-passwd' \
+ 'for passwd backend'
fi
diff --git a/collab/openldap/DETAILS b/collab/openldap/DETAILS
index 00bdb28..f39f683 100755
--- a/collab/openldap/DETAILS
+++ b/collab/openldap/DETAILS
@@ -1,15 +1,15 @@
SPELL=openldap
if [[ $OPENLDAP_BRANCH == stable ]]; then
- VERSION=2.4.30
- XVERSION=20120311
- SOURCE=$SPELL-stable-$XVERSION.tgz
-
SOURCE_HASH=sha512:89f032b069dc54cfe0c3149b85c5fedaf89b6b706c368da22852fed51c2574cb703823db1f4c52a9422d5274d4e70497f270fd558985675ab274d6025678c6f3
+ VERSION=2.4.31
+ SOURCE=$SPELL-$VERSION.tgz
+
SOURCE_HASH=sha512:c0f58928a339bedf68de4f95ca0e4d82b187d54ffa15834ebd69d8a90722f699cc495fb4f624450bc51b9e1bcb2b96c429b84dd80ba1930ecdd24c1cd77cc24b
else
VERSION=2.4.31
SOURCE=$SPELL-$VERSION.tgz

SOURCE_HASH=sha512:c0f58928a339bedf68de4f95ca0e4d82b187d54ffa15834ebd69d8a90722f699cc495fb4f624450bc51b9e1bcb2b96c429b84dd80ba1930ecdd24c1cd77cc24b
fi
- SOURCE_URI=$SPELL-$OPENLDAP_BRANCH/$SOURCE
+ SECURITY_PATCH=2
+ SOURCE_URI=$SPELL-release/$SOURCE
SOURCE_URL[0]=ftp://ftp.openldap.org/pub/OpenLDAP/$SOURCE_URI
SOURCE_URL[1]=ftp://gd.tuwien.ac.at/infosys/network/OpenLDAP/$SOURCE_URI
SOURCE_URL[2]=ftp://it.openldap.org/pub/OpenLDAP/$SOURCE_URI
@@ -18,7 +18,6 @@ SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
ENTERED=20010922
LICENSE[0]=http://www.openldap.org/software/release/license.html
KEYWORDS="ldap collab"
- SECURITY_PATCH=2
SHORT="fully featured open source LDAP software suite"
cat << EOF
The OpenLDAP Project is a collaborative effort to provide a robust,
diff --git a/collab/openldap/HISTORY b/collab/openldap/HISTORY
index 0e190e9..212b7f6 100644
--- a/collab/openldap/HISTORY
+++ b/collab/openldap/HISTORY
@@ -1,3 +1,21 @@
+2012-06-22 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS: 2.4.31 goes stable; updated source uri
+ * BUILD: fixed compilation with nss+nspr for moznss support; switched
to
+ OPENLDAP_OPTS
+ * DEPENDS: added multi-tls support; added missing deps; mdb has
nothing
+ to do with MySQL: it's a memory-mapped database backend; cyrus-sasl
->
+ LIBSASL
+ * CONFIGURE: added missing options; readability++; global safe switch
to
+ OPENLDAP_OPTS
+ * {PRE_,}SUB_DEPENDS: cyrus-sasl -> LIBSASL
+ * PREPARE: aligned branch names
+ * PRE_BUILD: apply new patch
+ * TRIGGERS: do this only if spell depends on `db'
+ * UP_TRIGGERS: corrected triggers to skip further checking if the
spell
+ hadn't been installed yet
+ * openldap-2.4-ntlm.patch: replaced by up-to-date patch
+ * openldap-2.4.31-ntlm.patch: added, for NTLM support
+
2012-05-02 Ladislav Hagara <hgr AT vabo.cz>
* DETAILS: 2.4.31

diff --git a/collab/openldap/PREPARE b/collab/openldap/PREPARE
index fe60ef1..16b338c 100755
--- a/collab/openldap/PREPARE
+++ b/collab/openldap/PREPARE
@@ -1,3 +1,3 @@
config_query_list OPENLDAP_BRANCH "Select which branch to build:" \
- stable \
- release
+ stable \
+ release
diff --git a/collab/openldap/PRE_BUILD b/collab/openldap/PRE_BUILD
index aee9428..258ed08 100755
--- a/collab/openldap/PRE_BUILD
+++ b/collab/openldap/PRE_BUILD
@@ -2,5 +2,5 @@ default_pre_build &&
cd "$SOURCE_DIRECTORY" &&

if [[ $OPENLDAP_NTLM == y ]]; then
- patch -p1 < "$SPELL_DIRECTORY/openldap-2.4-ntlm.patch"
+ patch -p1 < "$SPELL_DIRECTORY/openldap-2.4.31-ntlm.patch"
fi
diff --git a/collab/openldap/PRE_SUB_DEPENDS b/collab/openldap/PRE_SUB_DEPENDS
index 3625961..4328e50 100755
--- a/collab/openldap/PRE_SUB_DEPENDS
+++ b/collab/openldap/PRE_SUB_DEPENDS
@@ -1,5 +1,5 @@
case $THIS_SUB_DEPENDS in
- SASL) is_depends_enabled $SPELL cyrus-sasl;;
+ SASL) is_depends_enabled $SPELL $(get_spell_provider $SPELL LIBSASL);;
NTLM) [[ OPENLDAP_NTLM == "y" ]] && return 0;;
*) message "${PROBLEM_COLOR}bogus sub_depends: $SPELL
$THIS_SUB_DEPENDS${DEFAULT_COLOR}"
return 1;;
diff --git a/collab/openldap/SUB_DEPENDS b/collab/openldap/SUB_DEPENDS
index 391032f..a92065e 100755
--- a/collab/openldap/SUB_DEPENDS
+++ b/collab/openldap/SUB_DEPENDS
@@ -1,6 +1,6 @@
case $THIS_SUB_DEPENDS in
SASL) message "OpenLDAP with SASL support requested, forcing cyrus-sasl
dependency" &&
- depends cyrus-sasl "--with-cyrus-sasl";;
+ depends LIBSASL "--with-cyrus-sasl";;
NTLM) message "OpenLDAP with NTLM support requested, forcing NTLM patch"
&&
OPENLDAP_NTLM=y ;;
*) message "${PROBLEM_COLOR}bogus sub_depends: $SPELL
$THIS_SUB_DEPENDS${DEFAULT_COLOR}"
diff --git a/collab/openldap/TRIGGERS b/collab/openldap/TRIGGERS
index 14b231e..953906a 100755
--- a/collab/openldap/TRIGGERS
+++ b/collab/openldap/TRIGGERS
@@ -1,2 +1,3 @@
-# TODO do this only if spell depends on `db'
-on_cast db check_self
+if is_depends_enabled $SPELL db; then
+ on_cast db check_self
+fi
diff --git a/collab/openldap/UP_TRIGGERS b/collab/openldap/UP_TRIGGERS
index 7c79804..f548991 100755
--- a/collab/openldap/UP_TRIGGERS
+++ b/collab/openldap/UP_TRIGGERS
@@ -1,7 +1,7 @@
-local OLD_SPELL_VERSION=""
-spell_ok $SPELL && OLD_SPELL_VERSION="$(installed_version $SPELL)"
+spell_ok $SPELL && local OLD_SPELL_VERSION="$(installed_version $SPELL)" ||
return 0
+
if [ "${VERSION:0:3}" != "${OLD_SPELL_VERSION:0:3}" ]; then
- message "This is a possibly incompatible update of openldap..."
+ message "This is a possibly incompatible update of $SPELL..."
message "Figuring out what spells need to be recast, this may take a
while."
for each in $(show_up_depends $SPELL 1); do
if gaze install-spell $each | xargs readelf -d 2> /dev/null |
@@ -9,7 +9,7 @@ if [ "${VERSION:0:3}" != "${OLD_SPELL_VERSION:0:3}" ]; then
up_trigger $each cast_self
fi
done
-fi
+fi &&

if spell_ok curl && is_depends_enabled curl $SPELL; then
up_trigger curl cast_self
diff --git a/collab/openldap/openldap-2.4-ntlm.patch
b/collab/openldap/openldap-2.4-ntlm.patch
deleted file mode 100644
index 1f1e8f2..0000000
--- a/collab/openldap/openldap-2.4-ntlm.patch
+++ /dev/null
@@ -1,203 +0,0 @@
-(Note that this patch is not useful on its own... it just adds some
-hooks to work with the LDAP authentication process at a lower level
-than the API otherwise allows. The code that calls these hooks and
-actually drives the NTLM authentication process is in
-lib/e2k-global-catalog.c, and the code that actually implements the
-NTLM algorithms is in xntlm/.)
-
-This is a patch against OpenLDAP 2.2.6. Apply with -p0
-
-This patch was obtained from
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/openldap-ntlm.diff and
updated to openldap 2.4.14. Apply with -p1.
-
-diff -Naur openldap-2.4.14.orig/include/ldap.h openldap-2.4.14/include/ldap.h
---- openldap-2.4.14.orig/include/ldap.h 2009-02-18 03:43:05.491974110
-0800
-+++ openldap-2.4.14/include/ldap.h 2009-02-18 03:43:16.327725135 -0800
-@@ -2461,5 +2461,26 @@
- LDAPControl **ctrls,
- LDAPDerefRes **drp ));
-
-+/*
-+ * hacks for NTLM
-+ */
-+#define LDAP_AUTH_NTLM_REQUEST ((ber_tag_t) 0x8aU)
-+#define LDAP_AUTH_NTLM_RESPONSE ((ber_tag_t) 0x8bU)
-+LDAP_F( int )
-+ldap_ntlm_bind LDAP_P((
-+ LDAP *ld,
-+ LDAP_CONST char *dn,
-+ ber_tag_t tag,
-+ struct berval *cred,
-+ LDAPControl **sctrls,
-+ LDAPControl **cctrls,
-+ int *msgidp ));
-+LDAP_F( int )
-+ldap_parse_ntlm_bind_result LDAP_P((
-+ LDAP *ld,
-+ LDAPMessage *res,
-+ struct berval *challenge));
-+
-+
- LDAP_END_DECL
- #endif /* _LDAP_H */
-diff -Naur openldap-2.4.14.orig/libraries/libldap/Makefile.in
openldap-2.4.14/libraries/libldap/Makefile.in
---- openldap-2.4.14.orig/libraries/libldap/Makefile.in 2009-02-18
03:43:05.489975043 -0800
-+++ openldap-2.4.14/libraries/libldap/Makefile.in 2009-02-18
03:43:16.327725135 -0800
-@@ -20,7 +20,7 @@
- SRCS = bind.c open.c result.c error.c compare.c search.c \
- controls.c messages.c references.c extended.c cyrus.c \
- modify.c add.c modrdn.c delete.c abandon.c \
-- sasl.c gssapi.c sbind.c unbind.c cancel.c \
-+ sasl.c gssapi.c ntlm.c sbind.c unbind.c cancel.c \
- filter.c free.c sort.c passwd.c whoami.c \
- getdn.c getentry.c getattr.c getvalues.c addentry.c \
- request.c os-ip.c url.c pagectrl.c sortctrl.c vlvctrl.c \
-@@ -33,7 +33,7 @@
- OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \
- controls.lo messages.lo references.lo extended.lo cyrus.lo \
- modify.lo add.lo modrdn.lo delete.lo abandon.lo \
-- sasl.lo gssapi.lo sbind.lo unbind.lo cancel.lo \
-+ sasl.lo gssapi.lo ntlm.lo sbind.lo unbind.lo cancel.lo \
- filter.lo free.lo sort.lo passwd.lo whoami.lo \
- getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo \
- request.lo os-ip.lo url.lo pagectrl.lo sortctrl.lo vlvctrl.lo \
-diff -Naur openldap-2.4.14.orig/libraries/libldap/ntlm.c
openldap-2.4.14/libraries/libldap/ntlm.c
---- openldap-2.4.14.orig/libraries/libldap/ntlm.c 1969-12-31
16:00:00.000000000 -0800
-+++ openldap-2.4.14/libraries/libldap/ntlm.c 2009-02-18 03:43:16.328725611
-0800
-@@ -0,0 +1,137 @@
-+/* $OpenLDAP: pkg/ldap/libraries/libldap/ntlm.c,v 1.1.4.10 2002/01/04
20:38:21 kurt Exp $ */
-+/*
-+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
-+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
-+ */
-+
-+/* Mostly copied from sasl.c */
-+
-+#include "portable.h"
-+
-+#include <stdlib.h>
-+#include <stdio.h>
-+
-+#include <ac/socket.h>
-+#include <ac/string.h>
-+#include <ac/time.h>
-+#include <ac/errno.h>
-+
-+#include "ldap-int.h"
-+
-+int
-+ldap_ntlm_bind(
-+ LDAP *ld,
-+ LDAP_CONST char *dn,
-+ ber_tag_t tag,
-+ struct berval *cred,
-+ LDAPControl **sctrls,
-+ LDAPControl **cctrls,
-+ int *msgidp )
-+{
-+ BerElement *ber;
-+ int rc;
-+ ber_int_t id;
-+
-+ Debug( LDAP_DEBUG_TRACE, "ldap_ntlm_bind\n", 0, 0, 0 );
-+
-+ assert( ld != NULL );
-+ assert( LDAP_VALID( ld ) );
-+ assert( msgidp != NULL );
-+
-+ if( msgidp == NULL ) {
-+ ld->ld_errno = LDAP_PARAM_ERROR;
-+ return ld->ld_errno;
-+ }
-+
-+ /* create a message to send */
-+ if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
-+ ld->ld_errno = LDAP_NO_MEMORY;
-+ return ld->ld_errno;
-+ }
-+
-+ assert( LBER_VALID( ber ) );
-+
-+ LDAP_NEXT_MSGID( ld, id );
-+ rc = ber_printf( ber, "{it{istON}" /*}*/,
-+ id, LDAP_REQ_BIND,
-+ ld->ld_version, dn, tag,
-+ cred );
-+
-+ /* Put Server Controls */
-+ if( ldap_int_put_controls( ld, sctrls, ber ) != LDAP_SUCCESS ) {
-+ ber_free( ber, 1 );
-+ return ld->ld_errno;
-+ }
-+
-+ if ( ber_printf( ber, /*{*/ "N}" ) == -1 ) {
-+ ld->ld_errno = LDAP_ENCODING_ERROR;
-+ ber_free( ber, 1 );
-+ return ld->ld_errno;
-+ }
-+
-+ /* send the message */
-+ *msgidp = ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber, id );
-+
-+ if(*msgidp < 0)
-+ return ld->ld_errno;
-+
-+ return LDAP_SUCCESS;
-+}
-+
-+int
-+ldap_parse_ntlm_bind_result(
-+ LDAP *ld,
-+ LDAPMessage *res,
-+ struct berval *challenge)
-+{
-+ ber_int_t errcode;
-+ ber_tag_t tag;
-+ BerElement *ber;
-+ ber_len_t len;
-+
-+ Debug( LDAP_DEBUG_TRACE, "ldap_parse_ntlm_bind_result\n", 0, 0, 0 );
-+
-+ assert( ld != NULL );
-+ assert( LDAP_VALID( ld ) );
-+ assert( res != NULL );
-+
-+ if ( ld == NULL || res == NULL ) {
-+ return LDAP_PARAM_ERROR;
-+ }
-+
-+ if( res->lm_msgtype != LDAP_RES_BIND ) {
-+ ld->ld_errno = LDAP_PARAM_ERROR;
-+ return ld->ld_errno;
-+ }
-+
-+ if ( ld->ld_error ) {
-+ LDAP_FREE( ld->ld_error );
-+ ld->ld_error = NULL;
-+ }
-+ if ( ld->ld_matched ) {
-+ LDAP_FREE( ld->ld_matched );
-+ ld->ld_matched = NULL;
-+ }
-+
-+ /* parse results */
-+
-+ ber = ber_dup( res->lm_ber );
-+
-+ if( ber == NULL ) {
-+ ld->ld_errno = LDAP_NO_MEMORY;
-+ return ld->ld_errno;
-+ }
-+
-+ tag = ber_scanf( ber, "{ioa" /*}*/,
-+ &errcode, challenge, &ld->ld_error );
-+ ber_free( ber, 0 );
-+
-+ if( tag == LBER_ERROR ) {
-+ ld->ld_errno = LDAP_DECODING_ERROR;
-+ return ld->ld_errno;
-+ }
-+
-+ ld->ld_errno = errcode;
-+
-+ return( ld->ld_errno );
-+}
diff --git a/collab/openldap/openldap-2.4.31-ntlm.patch
b/collab/openldap/openldap-2.4.31-ntlm.patch
new file mode 100644
index 0000000..ae981eb
--- /dev/null
+++ b/collab/openldap/openldap-2.4.31-ntlm.patch
@@ -0,0 +1,219 @@
+Submitted By: Armin K. <krejzi at email dot com>
+Date: 2012-04-06
+Initial Package Version: 2.4.30
+Upstream Status: Unknown
+Origin: Debian
+Description: Patch from evolution-exchange (2.10.3). The
ldap_ntlm_bind function is
+ actually called by evolution-data-server, checked
at version 1.12.2.
+ Without this patch, the Exchange addressbook
integration uses simple binds
+ with cleartext passwords.
+
+--- openldap.orig/include/ldap.h 2012-02-29 18:37:09.000000000 +0100
++++ openldap/include/ldap.h 2012-04-01 00:20:00.059827789 +0200
+@@ -2517,5 +2517,25 @@
+ LDAPControl **ctrls,
+ LDAPDerefRes **drp ));
+
++/*
++ * hacks for NTLM
++ */
++#define LDAP_AUTH_NTLM_REQUEST ((ber_tag_t) 0x8aU)
++#define LDAP_AUTH_NTLM_RESPONSE ((ber_tag_t) 0x8bU)
++LDAP_F( int )
++ldap_ntlm_bind LDAP_P((
++ LDAP *ld,
++ LDAP_CONST char *dn,
++ ber_tag_t tag,
++ struct berval *cred,
++ LDAPControl **sctrls,
++ LDAPControl **cctrls,
++ int *msgidp ));
++LDAP_F( int )
++ldap_parse_ntlm_bind_result LDAP_P((
++ LDAP *ld,
++ LDAPMessage *res,
++ struct berval *challenge));
++
+ LDAP_END_DECL
+ #endif /* _LDAP_H */
+--- openldap.orig/libraries/libldap/Makefile.in 2012-04-01
00:18:54.233419658 +0200
++++ openldap/libraries/libldap/Makefile.in 2012-04-01 00:20:00.060827810
+0200
+@@ -27,7 +27,7 @@
+ init.c options.c print.c string.c util-int.c schema.c \
+ charray.c os-local.c dnssrv.c utf-8.c utf-8-conv.c \
+ tls2.c tls_o.c tls_g.c tls_m.c \
+- turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c \
++ turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c ntlm.c \
+ assertion.c deref.c ldif.c fetch.c
+
+ OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \
+@@ -40,7 +40,7 @@
+ init.lo options.lo print.lo string.lo util-int.lo schema.lo \
+ charray.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo \
+ tls2.lo tls_o.lo tls_g.lo tls_m.lo \
+- turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo \
++ turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo ntlm.lo \
+ assertion.lo deref.lo ldif.lo fetch.lo
+
+ LDAP_INCDIR= ../../include
+--- openldap.orig/libraries/libldap/ntlm.c 1970-01-01 01:00:00.000000000
+0100
++++ openldap/libraries/libldap/ntlm.c 2012-04-01 00:20:00.059827789 +0200
+@@ -0,0 +1,138 @@
++/* $OpenLDAP: pkg/ldap/libraries/libldap/ntlm.c,v 1.1.4.10 2002/01/04
20:38:21 kurt Exp $ */
++/*
++ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
++ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
++ */
++
++/* Mostly copied from sasl.c */
++
++#include "portable.h"
++
++#include <stdlib.h>
++#include <stdio.h>
++
++#include <ac/socket.h>
++#include <ac/string.h>
++#include <ac/time.h>
++#include <ac/errno.h>
++
++#include "ldap-int.h"
++
++int
++ldap_ntlm_bind(
++ LDAP *ld,
++ LDAP_CONST char *dn,
++ ber_tag_t tag,
++ struct berval *cred,
++ LDAPControl **sctrls,
++ LDAPControl **cctrls,
++ int *msgidp )
++{
++ BerElement *ber;
++ int rc;
++ ber_int_t id;
++
++ Debug( LDAP_DEBUG_TRACE, "ldap_ntlm_bind\n", 0, 0, 0 );
++
++ assert( ld != NULL );
++ assert( LDAP_VALID( ld ) );
++ assert( msgidp != NULL );
++
++ if( msgidp == NULL ) {
++ ld->ld_errno = LDAP_PARAM_ERROR;
++ return ld->ld_errno;
++ }
++
++ /* create a message to send */
++ if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
++ ld->ld_errno = LDAP_NO_MEMORY;
++ return ld->ld_errno;
++ }
++
++ assert( LBER_VALID( ber ) );
++
++ LDAP_NEXT_MSGID( ld, id );
++ rc = ber_printf( ber, "{it{istON}" /*}*/,
++ id, LDAP_REQ_BIND,
++ ld->ld_version, dn, tag,
++ cred );
++
++ /* Put Server Controls */
++ if( ldap_int_put_controls( ld, sctrls, ber ) != LDAP_SUCCESS ) {
++ ber_free( ber, 1 );
++ return ld->ld_errno;
++ }
++
++ if ( ber_printf( ber, /*{*/ "N}" ) == -1 ) {
++ ld->ld_errno = LDAP_ENCODING_ERROR;
++ ber_free( ber, 1 );
++ return ld->ld_errno;
++ }
++
++ /* send the message */
++ *msgidp = ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber, id );
++
++ if(*msgidp < 0)
++ return ld->ld_errno;
++
++ return LDAP_SUCCESS;
++}
++
++int
++ldap_parse_ntlm_bind_result(
++ LDAP *ld,
++ LDAPMessage *res,
++ struct berval *challenge)
++{
++ ber_int_t errcode;
++ ber_tag_t tag;
++ BerElement *ber;
++ ber_len_t len;
++
++ Debug( LDAP_DEBUG_TRACE, "ldap_parse_ntlm_bind_result\n", 0, 0, 0 );
++
++ assert( ld != NULL );
++ assert( LDAP_VALID( ld ) );
++ assert( res != NULL );
++
++ if ( ld == NULL || res == NULL ) {
++ return LDAP_PARAM_ERROR;
++ }
++
++ if( res->lm_msgtype != LDAP_RES_BIND ) {
++ ld->ld_errno = LDAP_PARAM_ERROR;
++ return ld->ld_errno;
++ }
++
++ if ( ld->ld_error ) {
++ LDAP_FREE( ld->ld_error );
++ ld->ld_error = NULL;
++ }
++ if ( ld->ld_matched ) {
++ LDAP_FREE( ld->ld_matched );
++ ld->ld_matched = NULL;
++ }
++
++ /* parse results */
++
++ ber = ber_dup( res->lm_ber );
++
++ if( ber == NULL ) {
++ ld->ld_errno = LDAP_NO_MEMORY;
++ return ld->ld_errno;
++ }
++
++ tag = ber_scanf( ber, "{ioa" /*}*/,
++ &errcode, challenge, &ld->ld_error );
++ ber_free( ber, 0 );
++
++ if( tag == LBER_ERROR ) {
++ ld->ld_errno = LDAP_DECODING_ERROR;
++ return ld->ld_errno;
++ }
++
++ ld->ld_errno = errcode;
++
++ return( ld->ld_errno );
++}
++
+--- openldap.orig/libraries/libldap_r/Makefile.in 2012-04-01
00:18:54.234419703 +0200
++++ openldap/libraries/libldap_r/Makefile.in 2012-04-01 00:20:00.060827810
+0200
+@@ -29,7 +29,7 @@
+ init.c options.c print.c string.c util-int.c schema.c \
+ charray.c os-local.c dnssrv.c utf-8.c utf-8-conv.c \
+ tls2.c tls_o.c tls_g.c tls_m.c \
+- turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c \
++ turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c ntlm.c \
+ assertion.c deref.c ldif.c fetch.c
+ SRCS = threads.c rdwr.c rmutex.c tpool.c rq.c \
+ thr_posix.c thr_cthreads.c thr_thr.c thr_nt.c \
+@@ -47,7 +47,7 @@
+ init.lo options.lo print.lo string.lo util-int.lo schema.lo \
+ charray.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo \
+ tls2.lo tls_o.lo tls_g.lo tls_m.lo \
+- turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo \
++ turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo ntlm.lo \
+ assertion.lo deref.lo ldif.lo fetch.lo
+
+ LDAP_INCDIR= ../../include



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (f4f70fe8ff8e6c1813ccd835097a70e8df08e332), Vlad Glagolev, 06/22/2012

Archive powered by MHonArc 2.6.24.

Top of Page