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
Lukas However
OpenLDAP
Commits
79e6c6af
Commit
79e6c6af
authored
20 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
latest limits code
parent
c877e565
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
CHANGES
+1
-1
1 addition, 1 deletion
CHANGES
build/version.var
+2
-2
2 additions, 2 deletions
build/version.var
servers/slapd/limits.c
+37
-50
37 additions, 50 deletions
servers/slapd/limits.c
with
40 additions
and
53 deletions
CHANGES
+
1
−
1
View file @
79e6c6af
OpenLDAP 2.2 Change Log
OpenLDAP 2.2.9
Engineering
OpenLDAP 2.2.9
Release
Fixed slapd syncrepl replication bugs (ITS#3055,3056,3069)
Fixed slapd slurpd update bugs
Fixed slapd inappropriate bind error disclosure bugs
...
...
This diff is collapsed.
Click to expand it.
build/version.var
+
2
−
2
View file @
79e6c6af
...
...
@@ -16,8 +16,8 @@ ol_package=OpenLDAP
ol_major
=
2
ol_minor
=
2
ol_patch
=
X
ol_api_inc
=
2020
8
ol_api_inc
=
2020
9
ol_api_current
=
7
ol_api_revision
=
1
ol_api_revision
=
2
ol_api_age
=
0
ol_release_date
=
"2004/03/26"
This diff is collapsed.
Click to expand it.
servers/slapd/limits.c
+
37
−
50
View file @
79e6c6af
...
...
@@ -683,6 +683,7 @@ limits_parse_one(
arg
++
;
if
(
strcasecmp
(
arg
,
"none"
)
==
0
)
{
limit
->
lms_t_soft
=
-
1
;
}
else
{
char
*
next
=
NULL
;
...
...
@@ -706,6 +707,7 @@ limits_parse_one(
arg
+=
STRLENOF
(
"soft="
);
if
(
strcasecmp
(
arg
,
"none"
)
==
0
)
{
limit
->
lms_s_soft
=
-
1
;
}
else
{
char
*
next
=
NULL
;
int
soft
=
strtol
(
arg
,
&
next
,
10
);
...
...
@@ -854,6 +856,7 @@ limits_parse_one(
arg
++
;
if
(
strcasecmp
(
arg
,
"none"
)
==
0
)
{
limit
->
lms_s_soft
=
-
1
;
}
else
{
char
*
next
=
NULL
;
...
...
@@ -903,23 +906,25 @@ limits_check( Operation *op, SlapReply *rs )
if
(
op
->
ors_tlimit
<=
0
)
{
op
->
ors_tlimit
=
op
->
ors_limit
->
lms_t_soft
;
/* if requested limit higher than hard limit, abort */
}
else
if
(
op
->
ors_tlimit
>
op
->
ors_limit
->
lms_t_hard
)
{
}
else
{
/* no hard limit means use soft instead */
if
(
op
->
ors_limit
->
lms_t_hard
==
0
&&
op
->
ors_limit
->
lms_t_soft
>
-
1
&&
op
->
ors_tlimit
>
op
->
ors_limit
->
lms_t_soft
)
{
op
->
ors_tlimit
=
op
->
ors_limit
->
lms_t_soft
;
if
(
op
->
ors_limit
->
lms_t_hard
==
0
)
{
if
(
op
->
ors_limit
->
lms_t_soft
>
-
1
&&
op
->
ors_tlimit
>
op
->
ors_limit
->
lms_t_soft
)
{
op
->
ors_tlimit
=
op
->
ors_limit
->
lms_t_soft
;
}
/* positive hard limit means abort */
}
else
if
(
op
->
ors_limit
->
lms_t_hard
>
0
)
{
/* -1 means no hard limit */
}
else
if
(
op
->
ors_limit
->
lms_t_hard
==
-
1
)
{
op
->
ors_tlimit
=
-
1
;
/* error if exceeding hard limit */
}
else
if
(
op
->
ors_tlimit
>
op
->
ors_limit
->
lms_t_hard
)
{
rs
->
sr_err
=
LDAP_ADMINLIMIT_EXCEEDED
;
send_ldap_result
(
op
,
rs
);
rs
->
sr_err
=
LDAP_SUCCESS
;
return
-
1
;
}
/* negative hard limit means no limit */
}
/* don't even get to backend if candidate check is disabled */
...
...
@@ -942,6 +947,9 @@ limits_check( Operation *op, SlapReply *rs )
rs
->
sr_err
=
LDAP_SUCCESS
;
rs
->
sr_text
=
NULL
;
return
-
1
;
}
else
if
(
op
->
ors_limit
->
lms_s_pr_total
==
-
1
)
{
slimit
=
-
1
;
}
else
{
/* if no limit is required, use soft limit */
...
...
@@ -953,23 +961,7 @@ limits_check( Operation *op, SlapReply *rs )
/* if the limit is set, check that it does not violate any limit */
if
(
op
->
ors_slimit
>
0
)
{
slimit2
=
op
->
ors_slimit
;
if
(
op
->
ors_limit
->
lms_s_pr_total
>
0
)
{
if
(
op
->
ors_slimit
>
op
->
ors_limit
->
lms_s_pr_total
)
{
slimit2
=
-
2
;
}
}
else
if
(
op
->
ors_limit
->
lms_s_hard
>
0
)
{
if
(
op
->
ors_slimit
>
op
->
ors_limit
->
lms_s_hard
)
{
slimit2
=
-
2
;
}
}
else
if
(
op
->
ors_limit
->
lms_s_soft
>
0
&&
op
->
ors_slimit
>
op
->
ors_limit
->
lms_s_soft
)
{
if
(
op
->
ors_slimit
>
op
->
ors_limit
->
lms_s_soft
)
{
slimit2
=
-
2
;
}
}
if
(
slimit2
==
-
2
)
{
if
(
op
->
ors_slimit
>
op
->
ors_limit
->
lms_s_pr_total
)
{
rs
->
sr_err
=
LDAP_ADMINLIMIT_EXCEEDED
;
send_ldap_result
(
op
,
rs
);
rs
->
sr_err
=
LDAP_SUCCESS
;
...
...
@@ -977,15 +969,7 @@ limits_check( Operation *op, SlapReply *rs )
}
}
else
{
if
(
op
->
ors_limit
->
lms_s_pr_total
>
0
)
{
slimit2
=
op
->
ors_limit
->
lms_s_pr_total
;
}
else
if
(
op
->
ors_limit
->
lms_s_hard
>
0
)
{
slimit2
=
op
->
ors_limit
->
lms_s_hard
;
}
else
if
(
op
->
ors_limit
->
lms_s_soft
>
0
)
{
slimit2
=
op
->
ors_limit
->
lms_s_soft
;
}
slimit2
=
op
->
ors_limit
->
lms_s_pr_total
;
}
total
=
slimit2
-
op
->
o_pagedresults_state
.
ps_count
;
...
...
@@ -1026,6 +1010,7 @@ limits_check( Operation *op, SlapReply *rs )
send_ldap_result
(
op
,
rs
);
rs
->
sr_err
=
LDAP_SUCCESS
;
return
-
1
;
}
else
{
op
->
ors_slimit
=
slimit
;
}
...
...
@@ -1035,26 +1020,28 @@ limits_check( Operation *op, SlapReply *rs )
op
->
ors_slimit
=
op
->
ors_limit
->
lms_s_hard
;
}
/* if requested limit higher than hard limit, abort */
}
else
if
(
op
->
ors_slimit
>
op
->
ors_limit
->
lms_s_hard
)
{
}
else
if
(
op
->
ors_slimit
==
0
)
{
op
->
ors_slimit
=
op
->
ors_limit
->
lms_s_soft
;
}
else
{
/* no hard limit means use soft instead */
if
(
op
->
ors_limit
->
lms_s_hard
==
0
&&
op
->
ors_limit
->
lms_s_soft
>
-
1
&&
op
->
ors_slimit
>
op
->
ors_limit
->
lms_s_soft
)
{
op
->
ors_slimit
=
op
->
ors_limit
->
lms_s_soft
;
if
(
op
->
ors_limit
->
lms_s_hard
==
0
)
{
if
(
op
->
ors_limit
->
lms_s_soft
>
-
1
&&
op
->
ors_slimit
>
op
->
ors_limit
->
lms_s_soft
)
{
op
->
ors_slimit
=
op
->
ors_limit
->
lms_s_soft
;
}
/* positive hard limit means abort */
}
else
if
(
op
->
ors_limit
->
lms_s_hard
>
0
)
{
/* -1 means no hard limit */
}
else
if
(
op
->
ors_limit
->
lms_s_hard
==
-
1
)
{
op
->
ors_slimit
=
-
1
;
/* error if exceeding hard limit */
}
else
if
(
op
->
ors_slimit
>
op
->
ors_limit
->
lms_s_hard
)
{
rs
->
sr_err
=
LDAP_ADMINLIMIT_EXCEEDED
;
send_ldap_result
(
op
,
rs
);
rs
->
sr_err
=
LDAP_SUCCESS
;
rs
->
sr_err
=
LDAP_SUCCESS
;
return
-
1
;
}
/* negative hard limit means no limit */
}
else
if
(
op
->
ors_slimit
==
0
)
{
op
->
ors_slimit
=
op
->
ors_limit
->
lms_s_soft
;
}
}
...
...
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