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
ingo Voss
OpenLDAP
Commits
80cfd811
Commit
80cfd811
authored
Mar 30, 2021
by
Ondřej Kuzník
Committed by
Quanah Gibson-Mount
Mar 31, 2021
Browse files
ITS#7786 Try to synthesize missing attribute types
parent
e8c03ba5
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/slapmodify.c
View file @
80cfd811
...
...
@@ -309,6 +309,16 @@ slapmodify( int argc, char **argv )
int
normalize
=
0
;
local_rc
=
slap_str2ad
(
mod
->
mod_type
,
&
mods
.
sm_desc
,
&
text
);
/*
* Usually this would be a bad idea (way too dangerous, risks
* corrupting the DB), but ITS#7786 documents this as a last
* resort to fix cn=config and missing attributes are one of
* the possible issues we might encounter.
*/
if
(
local_rc
==
LDAP_UNDEFINED_TYPE
&&
(
slapMode
&
SLAP_TOOL_NO_SCHEMA_CHECK
)
)
{
local_rc
=
slap_str2undef_ad
(
mod
->
mod_type
,
&
mods
.
sm_desc
,
&
text
,
0
);
}
if
(
local_rc
!=
LDAP_SUCCESS
)
{
fprintf
(
stderr
,
"%s: slap_str2ad(
\"
%s
\"
) failed for entry
\"
%s
\"
(%d: %s, lineno=%lu)
\n
"
,
progname
,
mod
->
mod_type
,
lr
.
lr_dn
.
bv_val
,
local_rc
,
text
,
lineno
);
...
...
Write
Preview
Supports
Markdown
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