openldap/openldap-fedora-systemd.patch

23 lines
730 B
Diff
Raw Normal View History

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;