Bug 504504 - Allow specifying arbitrary socket URLs for slapd
Allow specifying arbitrary socket URLs for slapd
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: openldap (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Jan Zeleny
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-07 12:49 EDT by Bernie Innocenti
Modified: 2009-06-09 13:12 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-09 08:19:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bernie Innocenti 2009-06-07 12:49:20 EDT
Please consider implementing this change to the ldap initscript:

--- /etc/init.d/ldap	2009-06-07 18:42:49.000000000 +0200
+++ /etc/init.d/ldap.orig	2009-06-07 18:42:33.000000000 +0200
@@ -166,9 +166,9 @@ function start() {
 	# Define a couple of local variables which we'll need. Maybe.
 	user=ldap
 	prog=`basename ${slapd}`
-	harg="$SLAPD_URLS"
+	harg=""
 	if test x$SLAPD_LDAP = xyes ; then
-	    harg="$harg ldap:///"
+	    harg="ldap:///"
 	fi
 	if test x$SLAPD_LDAPS = xyes ; then
 	    harg="$harg ldaps:///"

(along with a commented out sample in /etc/sysconfig/ldap, of course)
Comment 1 Jan Zeleny 2009-06-08 05:05:47 EDT
Are you sure you are using most recent version of openldap-servers? The issue has already been solved there.
Comment 2 Bernie Innocenti 2009-06-08 08:02:12 EDT
(In reply to comment #1)
> Are you sure you are using most recent version of openldap-servers? The issue
> has already been solved there.  

Sorry, my patch was reversed :-)

--- /etc/init.d/ldap.orig 2009-06-07 18:42:49.000000000 +0200
+++ /etc/init.d/ldap 2009-06-07 18:42:33.000000000 +0200
@@ -166,9 +166,9 @@ function start() {
  # Define a couple of local variables which we'll need. Maybe.
  user=ldap
  prog=`basename ${slapd}`
- harg=""
+ harg="$SLAPD_URLS"
  if test x$SLAPD_LDAP = xyes ; then
-     harg="ldap:///"
+     harg="$harg ldap:///"
  fi
  if test x$SLAPD_LDAPS = xyes ; then
      harg="$harg ldaps:///"
Comment 3 Jan Zeleny 2009-06-08 08:48:54 EDT
That's better. I suggest $SLAPD_URLS is extern variable, right? In that case some kind of input scanning mechanism for this should be implemented before the change is made. Other than that I think changing this behavior is completely acceptable. Do you have any input-scanning function implemented, which you could provide? I can write it myself, but if you have one, it will be faster.
Comment 4 Bernie Innocenti 2009-06-09 04:42:25 EDT
I meant to initialize SLAPD_URLS in /etc/sysconfig/ldap, like this:

SLAPD_URLS="ldapi://%2Fvar%2Flib%2Fldap_root%2Fldapi ldapi:/// ldaps:///"

This shouldn't require any particular parsing.
Comment 5 Jan Zeleny 2009-06-09 07:11:26 EDT
I see your point. I still think there should be some sort of parsing, but there are many things in init script, which could have been better. Hopefully I'll have some time to do more work on that init script. For now there is no problem from my side and patch will be applied soon.
Comment 6 Jan Zeleny 2009-06-09 08:19:16 EDT
Script has been updated (along with config file) in both F11 and rawhide. Closing the bug.
Comment 7 Bug Zapper 2009-06-09 13:12:02 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Note You need to log in before you can comment on or make changes to this bug.