[Pkg-openldap-devel] r757 - in openldap/trunk-2.3/debian: . patches
Matthijs Mohlmann
matthijs at alioth.debian.org
Sat Dec 9 18:34:10 CET 2006
Author: matthijs
Date: 2006-12-09 18:34:09 +0100 (Sat, 09 Dec 2006)
New Revision: 757
Added:
openldap/trunk-2.3/debian/patches/sasl-default-path
Modified:
openldap/trunk-2.3/debian/changelog
openldap/trunk-2.3/debian/patches/series
Log:
* Added patch to search first in /etc/ldap/sasl2 and after that in /usr/lib/sasl2 for configuration.
Modified: openldap/trunk-2.3/debian/changelog
===================================================================
--- openldap/trunk-2.3/debian/changelog 2006-12-09 15:43:50 UTC (rev 756)
+++ openldap/trunk-2.3/debian/changelog 2006-12-09 17:34:09 UTC (rev 757)
@@ -10,6 +10,8 @@
(Closes: #390337)
* Do not ask the question allow ldap v2 logins when omit configuration is
true. (Closes: #401003)
+ * Add patch to look also in /etc/ldap/sasl2 for sasl configuration.
+ (Closes: #398657)
-- Matthijs Mohlmann <matthijs at cacholong.nl> Sat, 9 Dec 2006 15:16:12 +0100
Added: openldap/trunk-2.3/debian/patches/sasl-default-path
===================================================================
--- openldap/trunk-2.3/debian/patches/sasl-default-path 2006-12-09 15:43:50 UTC (rev 756)
+++ openldap/trunk-2.3/debian/patches/sasl-default-path 2006-12-09 17:34:09 UTC (rev 757)
@@ -0,0 +1,54 @@
+Index: include/ldap_defaults.h
+===================================================================
+--- include/ldap_defaults.h.orig
++++ include/ldap_defaults.h
+@@ -65,4 +65,6 @@
+ /* dn of the default "monitor" subentry */
+ #define SLAPD_MONITOR_DN "cn=Monitor"
+
++#define SASL_CONFIGPATH LDAP_SYSCONFDIR LDAP_DIRSEP "sasl2"
++
+ #endif /* _LDAP_CONFIG_H */
+Index: servers/slapd/sasl.c
+===================================================================
+--- servers/slapd/sasl.c.orig
++++ servers/slapd/sasl.c
+@@ -951,12 +951,38 @@
+
+ #endif /* HAVE_CYRUS_SASL */
+
++static int
++slap_sasl_getconfpath( void * context, char ** path )
++{
++ char * sasl_default_configpath;
++ size_t len;
++
++#if SASL_VERSION_MAJOR >= 2
++ sasl_default_configpath = "/usr/lib/sasl2";
++#else
++ sasl_default_configpath = "/usr/lib/sasl";
++#endif
++
++ len = strlen(SASL_CONFIGPATH) + 1 /* colon */ +
++ strlen(sasl_default_configpath) + 1 /* \0 */;
++ *path = malloc( len );
++ if ( *path == NULL )
++ return SASL_FAIL;
++
++ if (snprintf( *path, len, "%s:%s", SASL_CONFIGPATH,
++ sasl_default_configpath ) != len-1 )
++ return SASL_FAIL;
++
++ return SASL_OK;
++}
++
+ int slap_sasl_init( void )
+ {
+ #ifdef HAVE_CYRUS_SASL
+ int rc;
+ static sasl_callback_t server_callbacks[] = {
+ { SASL_CB_LOG, &slap_sasl_log, NULL },
++ { SASL_CB_GETCONFPATH, &slap_sasl_getconfpath, NULL },
+ { SASL_CB_LIST_END, NULL, NULL }
+ };
+
Modified: openldap/trunk-2.3/debian/patches/series
===================================================================
--- openldap/trunk-2.3/debian/patches/series 2006-12-09 15:43:50 UTC (rev 756)
+++ openldap/trunk-2.3/debian/patches/series 2006-12-09 17:34:09 UTC (rev 757)
@@ -12,3 +12,4 @@
disable-epoll-system-call -p0
wrong-database-location -p0
index-files-created-as-root -p0
+sasl-default-path -p0
More information about the Pkg-openldap-devel
mailing list