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
orbea -
OpenLDAP
Commits
7359a541
Commit
7359a541
authored
Jun 20, 2018
by
Michael Ströder
Committed by
Quanah Gibson-Mount
Oct 26, 2018
Browse files
ITS#8866 slapo-unique to return filter used in diagnostic message
parent
10a6ffa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/overlays/unique.c
View file @
7359a541
...
...
@@ -965,6 +965,8 @@ unique_search(
slap_callback
cb
=
{
NULL
,
NULL
,
NULL
,
NULL
};
/* XXX */
unique_counter
uq
=
{
NULL
,
0
};
int
rc
;
char
*
errmsg
;
int
errmsgsize
;
Debug
(
LDAP_DEBUG_TRACE
,
"==> unique_search %s
\n
"
,
key
->
bv_val
,
0
,
0
);
...
...
@@ -1009,9 +1011,12 @@ unique_search(
Debug
(
LDAP_DEBUG_TRACE
,
"=> unique_search found %d records
\n
"
,
uq
.
count
,
0
,
0
);
if
(
uq
.
count
)
{
errmsgsize
=
sizeof
(
"non-unique attributes found with "
)
+
key
->
bv_len
;
errmsg
=
ch_malloc
(
errmsgsize
);
snprintf
(
errmsg
,
errmsgsize
,
"non-unique attributes found with %s"
,
key
->
bv_val
);
op
->
o_bd
->
bd_info
=
(
BackendInfo
*
)
on
->
on_info
;
send_ldap_error
(
op
,
rs
,
LDAP_CONSTRAINT_VIOLATION
,
"some attributes not unique"
);
send_ldap_error
(
op
,
rs
,
LDAP_CONSTRAINT_VIOLATION
,
errmsg
);
ch_free
(
errmsg
);
return
(
rs
->
sr_err
);
}
...
...
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