Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Barchiesi
OpenLDAP
Commits
8d407bc2
Commit
8d407bc2
authored
24 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Modify ava code to return error text
Filter code needs to be updated to properly handle soft errors.
parent
c689e1cb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
servers/slapd/ava.c
+7
-4
7 additions, 4 deletions
servers/slapd/ava.c
servers/slapd/filter.c
+4
-8
4 additions, 8 deletions
servers/slapd/filter.c
servers/slapd/proto-slap.h
+6
-2
6 additions, 2 deletions
servers/slapd/proto-slap.h
with
17 additions
and
14 deletions
servers/slapd/ava.c
+
7
−
4
View file @
8d407bc2
...
...
@@ -32,11 +32,11 @@ ava_free(
int
get_ava
(
BerElement
*
ber
,
AttributeAssertion
**
ava
AttributeAssertion
**
ava
,
char
**
text
)
{
int
rc
;
char
*
text
;
struct
berval
type
,
*
value
;
AttributeAssertion
*
aa
;
...
...
@@ -44,13 +44,14 @@ get_ava(
if
(
rc
==
LBER_ERROR
)
{
Debug
(
LDAP_DEBUG_ANY
,
" get_ava ber_scanf
\n
"
,
0
,
0
,
0
);
*
text
=
"Error decoding attribute value assertion"
;
return
SLAPD_DISCONNECT
;
}
aa
=
ch_malloc
(
sizeof
(
AttributeAssertion
)
);
aa
->
aa_desc
=
NULL
;
rc
=
slap_bv2ad
(
&
type
,
&
aa
->
aa_desc
,
&
text
);
rc
=
slap_bv2ad
(
&
type
,
&
aa
->
aa_desc
,
text
);
if
(
rc
!=
LDAP_SUCCESS
)
{
ch_free
(
type
.
bv_val
);
...
...
@@ -83,12 +84,14 @@ ava_free(
int
get_ava
(
BerElement
*
ber
,
Ava
*
ava
Ava
*
ava
,
char
**
text
)
{
if
(
ber_scanf
(
ber
,
"{ao}"
,
&
ava
->
ava_type
,
&
ava
->
ava_value
)
==
LBER_ERROR
)
{
Debug
(
LDAP_DEBUG_ANY
,
" get_ava ber_scanf
\n
"
,
0
,
0
,
0
);
*
text
=
"Error decoding attribute value assertion"
;
return
SLAPD_DISCONNECT
;
}
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/filter.c
+
4
−
8
View file @
8d407bc2
...
...
@@ -94,8 +94,7 @@ get_filter(
case
LDAP_FILTER_EQUALITY
:
Debug
(
LDAP_DEBUG_FILTER
,
"EQUALITY
\n
"
,
0
,
0
,
0
);
if
(
(
err
=
get_ava
(
ber
,
&
f
->
f_ava
))
!=
LDAP_SUCCESS
)
{
*
text
=
"error decoding filter"
;
if
(
(
err
=
get_ava
(
ber
,
&
f
->
f_ava
,
text
))
!=
LDAP_SUCCESS
)
{
break
;
}
...
...
@@ -127,8 +126,7 @@ get_filter(
case
LDAP_FILTER_GE
:
Debug
(
LDAP_DEBUG_FILTER
,
"GE
\n
"
,
0
,
0
,
0
);
if
(
(
err
=
get_ava
(
ber
,
&
f
->
f_ava
))
!=
LDAP_SUCCESS
)
{
*
text
=
"decoding filter error"
;
if
(
(
err
=
get_ava
(
ber
,
&
f
->
f_ava
,
text
))
!=
LDAP_SUCCESS
)
{
break
;
}
...
...
@@ -153,8 +151,7 @@ get_filter(
case
LDAP_FILTER_LE
:
Debug
(
LDAP_DEBUG_FILTER
,
"LE
\n
"
,
0
,
0
,
0
);
if
(
(
err
=
get_ava
(
ber
,
&
f
->
f_ava
))
!=
LDAP_SUCCESS
)
{
*
text
=
"decoding filter error"
;
if
(
(
err
=
get_ava
(
ber
,
&
f
->
f_ava
,
text
))
!=
LDAP_SUCCESS
)
{
break
;
}
...
...
@@ -220,8 +217,7 @@ get_filter(
case
LDAP_FILTER_APPROX
:
Debug
(
LDAP_DEBUG_FILTER
,
"APPROX
\n
"
,
0
,
0
,
0
);
if
(
(
err
=
get_ava
(
ber
,
&
f
->
f_ava
))
!=
LDAP_SUCCESS
)
{
*
text
=
"decoding filter error"
;
if
(
(
err
=
get_ava
(
ber
,
&
f
->
f_ava
,
text
))
!=
LDAP_SUCCESS
)
{
break
;
}
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/proto-slap.h
+
6
−
2
View file @
8d407bc2
...
...
@@ -142,12 +142,16 @@ LIBSLAPD_F (Attribute *) attrs_dup LDAP_P(( Attribute *a ));
#ifdef SLAPD_SCHEMA_NOT_COMPAT
LIBSLAPD_F
(
int
)
get_ava
LDAP_P
((
BerElement
*
ber
,
AttributeAssertion
**
ava
));
AttributeAssertion
**
ava
,
char
**
text
));
LIBSLAPD_F
(
void
)
ava_free
LDAP_P
((
AttributeAssertion
*
ava
,
int
freeit
));
#else
LIBSLAPD_F
(
int
)
get_ava
LDAP_P
((
BerElement
*
ber
,
Ava
*
ava
));
LIBSLAPD_F
(
int
)
get_ava
LDAP_P
((
BerElement
*
ber
,
Ava
*
ava
,
char
**
text
));
LIBSLAPD_F
(
void
)
ava_free
LDAP_P
((
Ava
*
ava
,
int
freeit
));
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment