Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
Christopher Ng
OpenLDAP
Commits
e9ab2f8d
Commit
e9ab2f8d
authored
22 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Catch NULL control OID up front.
parent
7c4445ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slapd/controls.c
+29
-11
29 additions, 11 deletions
servers/slapd/controls.c
with
29 additions
and
11 deletions
servers/slapd/controls.c
+
29
−
11
View file @
e9ab2f8d
...
...
@@ -156,10 +156,13 @@ int get_ctrls(
}
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
ENTRY
,
"get_ctrls: conn %lu
\n
"
,
conn
->
c_connid
,
0
,
0
);
LDAP_LOG
(
OPERATION
,
ENTRY
,
"get_ctrls: conn %lu
\n
"
,
conn
->
c_connid
,
0
,
0
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"=> get_ctrls
\n
"
,
0
,
0
,
0
);
Debug
(
LDAP_DEBUG_TRACE
,
"=> get_ctrls
\n
"
,
0
,
0
,
0
);
#endif
if
(
op
->
o_protocol
<
LDAP_VERSION3
)
{
rc
=
SLAPD_DISCONNECT
;
errmsg
=
"controls require LDAPv3"
;
...
...
@@ -232,11 +235,29 @@ int get_ctrls(
Debug
(
LDAP_DEBUG_TRACE
,
"=> get_ctrls: get oid failed.
\n
"
,
0
,
0
,
0
);
#endif
ldap_controls_free
(
op
->
o_ctrls
);
op
->
o_ctrls
=
NULL
;
rc
=
SLAPD_DISCONNECT
;
errmsg
=
"decoding controls error"
;
goto
return_results
;
}
else
if
(
c
->
ldctl_oid
==
NULL
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
INFO
,
"get_ctrls: conn %lu got emtpy OID.
\n
"
,
conn
->
c_connid
,
0
,
0
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"get_ctrls: conn %lu got emtpy OID.
\n
"
,
conn
->
c_connid
,
0
,
0
);
#endif
ldap_controls_free
(
op
->
o_ctrls
);
op
->
o_ctrls
=
NULL
;
rc
=
LDAP_PROTOCOL_ERROR
;
errmsg
=
"OID field is empty"
;
goto
return_results
;
}
tag
=
ber_peek_tag
(
ber
,
&
len
);
...
...
@@ -272,13 +293,12 @@ int get_ctrls(
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
INFO
,
"get_ctrls: conn %lu: "
"%s (%scritical): get value failed.
\n
"
,
conn
->
c_connid
,
c
->
ldctl_oid
?
c
->
ldctl_oid
:
"(NULL)"
,
conn
->
c_connid
,
c
->
ldctl_oid
,
c
->
ldctl_iscritical
?
""
:
"non"
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"=> get_ctrls: conn %lu: "
"%s (%scritical): get value failed.
\n
"
,
conn
->
c_connid
,
c
->
ldctl_oid
?
c
->
ldctl_oid
:
"(NULL)"
,
conn
->
c_connid
,
c
->
ldctl_oid
,
c
->
ldctl_iscritical
?
""
:
"non"
);
#endif
ldap_controls_free
(
op
->
o_ctrls
);
...
...
@@ -292,13 +312,11 @@ int get_ctrls(
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
INFO
,
"get_ctrls: conn %lu oid=
\"
%s
\"
(%scritical)
\n
"
,
conn
->
c_connid
,
c
->
ldctl_oid
?
c
->
ldctl_oid
:
"(NULL)"
,
c
->
ldctl_iscritical
?
""
:
"non"
);
conn
->
c_connid
,
c
->
ldctl_oid
,
c
->
ldctl_iscritical
?
""
:
"non"
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"=> get_ctrls: oid=
\"
%s
\"
(%scritical)
\n
"
,
c
->
ldctl_oid
?
c
->
ldctl_oid
:
"(NULL)"
,
c
->
ldctl_iscritical
?
""
:
"non"
,
0
);
Debug
(
LDAP_DEBUG_TRACE
,
"=> get_ctrls: oid=
\"
%s
\"
(%scritical)
\n
"
,
c
->
ldctl_oid
,
c
->
ldctl_iscritical
?
""
:
"non"
,
0
);
#endif
sc
=
find_ctrl
(
c
->
ldctl_oid
);
...
...
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