openldap/openldap-fedora-systemd.patch
Jan Vcelak a0c545d1a7 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.)
2011-11-01 13:34:30 +01:00

23 lines
730 B
Diff

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;