diff --git a/openldap-fedora-systemd.patch b/openldap-fedora-systemd.patch new file mode 100644 index 0000000..3d2dcce --- /dev/null +++ b/openldap-fedora-systemd.patch @@ -0,0 +1,22 @@ +Skip any empty parameters when parsing command line options. +This is required because systemd does not expand variables the same way as shell does, +we need it because of an empty SLAPD_OPTIONS in environment file. + +Fedora specific patch. + +Author: Jan Vcelak + +diff -uNPrp openldap-2.4.26/servers/slapd/main.c openldap-2.4.26.fix/servers/slapd/main.c +--- openldap-2.4.26/servers/slapd/main.c 2011-06-30 17:13:36.000000000 +0200 ++++ openldap-2.4.26.fix/servers/slapd/main.c 2011-10-27 17:05:02.641066298 +0200 +@@ -682,6 +682,10 @@ unhandled_option:; + } + } + ++ /* skip empty parameters */ ++ while ( optind < argc && *argv[optind] == '\0' ) ++ optind += 1; ++ + if ( optind != argc ) + goto unhandled_option; + diff --git a/openldap.spec b/openldap.spec index 7685d24..e6f4c84 100644 --- a/openldap.spec +++ b/openldap.spec @@ -44,6 +44,9 @@ Patch17: openldap-man-ldap-sync.patch Patch18: openldap-nss-handshake-threadsafe.patch Patch19: openldap-syncrepl-unset-tls-options.patch +# Fedora specific patches +Patch100: openldap-fedora-systemd.patch + # patches for the evolution library (see README.evolution) Patch200: openldap-evolution-ntlm.patch @@ -153,6 +156,8 @@ pushd openldap-%{version} %patch18 -p1 -b .nss-handshake-threadsafe %patch19 -p1 -b .syncrepl-unset-tls-options +%patch100 -p1 -b .fedora-systemd + cp %{_datadir}/libtool/config/config.{sub,guess} build/ for subdir in build-servers build-clients ; do