diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2008-05-14 18:39:31 +0000 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2008-05-14 18:39:31 +0000 |
commit | 9f49d5494f278f07a0810053eac064f443c0c802 (patch) | |
tree | a355e8e9ca485e3b8d47fc5585c6ba1718a3a9cf /ldap | |
parent | b7e14a574e205b5d2c88cddeadb24029b428ed19 (diff) | |
download | ds-9f49d5494f278f07a0810053eac064f443c0c802.tar.gz ds-9f49d5494f278f07a0810053eac064f443c0c802.tar.xz ds-9f49d5494f278f07a0810053eac064f443c0c802.zip |
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.
Diffstat (limited to 'ldap')
-rw-r--r-- | ldap/servers/slapd/config.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ldap/servers/slapd/config.c b/ldap/servers/slapd/config.c index 75777699..fe62e9b1 100644 --- a/ldap/servers/slapd/config.c +++ b/ldap/servers/slapd/config.c @@ -375,7 +375,33 @@ slapd_bootstrap_config(const char *configdir) 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))) |