Normally the config engine generates the "{x}" index in the RDN
automatically, so it can be omitted when initially loading these entries.
.TP
-.B olcModuleLoad: <filename>
-Specify the name of a dynamically loadable module to load. The filename
+.B olcModuleLoad: <filename> [<arguments>...]
+Specify the name of a dynamically loadable module to load and any
+additional arguments if supported by the module. The filename
may be an absolute path name or a simple filename. Non-absolute names
are searched for in the directories specified by the
.B olcModulePath
Specify the maximum depth of nested filters in search requests.
The default is 1000.
.TP
-.B moduleload <filename>
-Specify the name of a dynamically loadable module to load. The filename
+.B moduleload <filename> [<arguments>...]
+Specify the name of a dynamically loadable module to load and any
+additional arguments if supported by the module. The filename
may be an absolute path name or a simple filename. Non-absolute names
are searched for in the directories specified by the
.B modulepath
.BR module\-load = argon2
.LP
.RE
+Or if non-default parameters are required:
+.RS
+.LP
+.B \-o
+.BR module\-load =" argon2
+.RB [ <param> ...]"
+.LP
+.RE
Depending on
.BR argon2 's
location, you may also need:
.LP
.nf
module\-path=<pathspec> (see `\fBmodulepath\fP' in slapd.conf(5))
- module\-load=<filename> (see `\fBmoduleload\fP' in slapd.conf(5))
+ module\-load="<filename> [<arguments>...]" (see `\fBmoduleload\fP' in slapd.conf(5))
.in
You can load a dynamically loadable password hash module by
static char *modulepath = NULL;
static char *moduleload = NULL;
+static int moduleargc = 0;
+static char **moduleargv = NULL;
static void
usage(const char *s)
modulepath = p;
} else if ( strncasecmp( optarg, "module-load", len ) == 0 ) {
- moduleload = p;
+ ConfigArgs c = { .line = p };
+
+ if ( config_fp_parse_line( &c ) ) {
+ return -1;
+ }
+ moduleload = c.argv[0];
+
+ moduleargc = c.argc - 1;
+ if ( moduleargc ) {
+ moduleargv = c.argv+1;
+ }
} else {
return -1;
goto destroy;
}
- if ( moduleload && module_load(moduleload, 0, NULL) ) {
+ if ( moduleload && module_load(moduleload, moduleargc, moduleargv) ) {
rc = EXIT_FAILURE;
goto destroy;
}