patch slapd to skip empty arguments
This is required by systemd, as variable expansion works there different than in shell. Empty SLAPD_OPTIONS in environment file would not work. (The patch is Fedora specific.)
This commit is contained in:
parent
33514c3f00
commit
a0c545d1a7
22
openldap-fedora-systemd.patch
Normal file
22
openldap-fedora-systemd.patch
Normal file
@ -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 <jvcelak@redhat.com>
|
||||
|
||||
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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user