Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
8b353df0
Commit
8b353df0
authored
Apr 09, 2021
by
Ondřej Kuzník
Browse files
ITS
#9517
Add module args support to slappaswd and relevant docs
parent
d0eae409
Changes
5
Hide whitespace changes
Inline
Side-by-side
doc/man/man5/slapd-config.5
View file @
8b353df0
...
...
@@ -1063,8 +1063,9 @@ per
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
...
...
doc/man/man5/slapd.conf.5
View file @
8b353df0
...
...
@@ -747,8 +747,9 @@ help analyze the logs.
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
...
...
doc/man/man5/slappw-argon2.5
View file @
8b353df0
...
...
@@ -75,6 +75,14 @@ The relevant option/value is:
.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:
...
...
doc/man/man8/slappasswd.8
View file @
8b353df0
...
...
@@ -165,7 +165,7 @@ Possible generic options/values are:
.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
...
...
servers/slapd/slappasswd.c
View file @
8b353df0
...
...
@@ -44,6 +44,8 @@
static
char
*
modulepath
=
NULL
;
static
char
*
moduleload
=
NULL
;
static
int
moduleargc
=
0
;
static
char
**
moduleargv
=
NULL
;
static
void
usage
(
const
char
*
s
)
...
...
@@ -82,7 +84,17 @@ parse_slappasswdopt( void )
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
;
...
...
@@ -223,7 +235,7 @@ slappasswd( int argc, char *argv[] )
goto
destroy
;
}
if
(
moduleload
&&
module_load
(
moduleload
,
0
,
NULL
)
)
{
if
(
moduleload
&&
module_load
(
moduleload
,
moduleargc
,
moduleargv
)
)
{
rc
=
EXIT_FAILURE
;
goto
destroy
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment