Bug 504504

Summary: Allow specifying arbitrary socket URLs for slapd
Product: [Fedora] Fedora Reporter: Bernie Innocenti <bernie+fedora>
Component: openldapAssignee: Jan Zeleny <jzeleny>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: jzeleny
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-09 12:19:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bernie Innocenti 2009-06-07 16:49:20 UTC
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 09:05:47 UTC
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 12:02:12 UTC
(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 12:48:54 UTC
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 08:42:25 UTC
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 11:11:26 UTC
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 12:19:16 UTC
Script has been updated (along with config file) in both F11 and rawhide. Closing the bug.

Comment 7 Bug Zapper 2009-06-09 17:12:02 UTC
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