Blame SOURCES/openldap-fedora-systemd.patch

767ab2
Skip any empty parameters when parsing command line options.
767ab2
This is required because systemd does not expand variables the same way as shell does,
767ab2
we need it because of an empty SLAPD_OPTIONS in environment file.
767ab2
767ab2
Fedora specific patch.
767ab2
767ab2
Author: Jan Vcelak <jvcelak@redhat.com>
767ab2
767ab2
diff --git a/servers/slapd/main.c b/servers/slapd/main.c
767ab2
index dac4864..83614f4 100644
767ab2
--- a/servers/slapd/main.c
767ab2
+++ b/servers/slapd/main.c
767ab2
@@ -685,6 +685,10 @@ unhandled_option:;
767ab2
 		}
767ab2
 	}
767ab2
 
767ab2
+	/* skip empty parameters */
767ab2
+	while ( optind < argc && *argv[optind] == '\0' )
767ab2
+		optind += 1;
767ab2
+
767ab2
 	if ( optind != argc )
767ab2
 		goto unhandled_option;
767ab2