[Fedora-directory-commits] ldapserver/ldap/servers/slapd config.c, 1.10, 1.11

Noriko Hosoi (nhosoi) fedora-directory-commits at redhat.com
Wed May 14 18:39:33 UTC 2008


Author: nhosoi

Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16574

Modified Files:
	config.c 
Log Message:
Resolves: #230673
Summary: LDAPI: referral mode needs LDAPI socket
Problem Description: If you start the server with the referral mode, e.g.,
like this:
 ns-slapd refer -D /etc/dirsrv/slapd-test -r ldap://laputa.example.com
UNIX socket for LDAPI was not opened since LDAPI configuration parameters are
not read from dse.ldif at that moment.
Fix Description: adding the code to process nsslapd-ldapifilepath and
nsslapd-ldapilisten in slapd_bootstrap_config. 



Index: config.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/config.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- config.c	10 Nov 2006 23:45:40 -0000	1.10
+++ config.c	14 May 2008 18:39:31 -0000	1.11
@@ -375,7 +375,33 @@
 									  CONFIG_SASLPATH_ATTRIBUTE, errorbuf);
 					}
 				}
+#if defined(ENABLE_LDAPI)
+				/* set the ldapi file path; needed in main */
+				workpath[0] = '\0';
+				if (entry_has_attr_and_value(e, CONFIG_LDAPI_FILENAME_ATTRIBUTE,
+						workpath, sizeof(workpath)))
+				{
+					if (config_set_ldapi_filename(CONFIG_LDAPI_FILENAME_ATTRIBUTE,
+							workpath, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
+					{
+						LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s. \n", configfile,
+									  CONFIG_LDAPI_FILENAME_ATTRIBUTE, errorbuf);
+					}
+				}
 
+				/* set the ldapi switch; needed in main */
+				workpath[0] = '\0';
+				if (entry_has_attr_and_value(e, CONFIG_LDAPI_SWITCH_ATTRIBUTE,
+						workpath, sizeof(workpath)))
+				{
+					if (config_set_ldapi_switch(CONFIG_LDAPI_SWITCH_ATTRIBUTE,
+							workpath, errorbuf, CONFIG_APPLY) != LDAP_SUCCESS)
+					{
+						LDAPDebug(LDAP_DEBUG_ANY, "%s: %s: %s. \n", configfile,
+									  CONFIG_LDAPI_SWITCH_ATTRIBUTE, errorbuf);
+					}
+				}
+#endif
 				/* see if the entry is a child of the plugin base dn */
 				if (slapi_sdn_isparent(&plug_dn,
 									   slapi_entry_get_sdn_const(e)))




More information about the Fedora-directory-commits mailing list