Bug 504504 - Allow specifying arbitrary socket URLs for slapd
Summary: Allow specifying arbitrary socket URLs for slapd
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openldap
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Zeleny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-07 16:49 UTC by Bernie Innocenti
Modified: 2009-06-09 17:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-09 12:19:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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


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