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
Jaak Ristioja
OpenLDAP
Commits
4645eeb5
Commit
4645eeb5
authored
21 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
cleanup DN style in limits
parent
ac0d4517
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/man/man5/slapd.conf.5
+32
-15
32 additions, 15 deletions
doc/man/man5/slapd.conf.5
servers/slapd/limits.c
+41
-8
41 additions, 8 deletions
servers/slapd/limits.c
with
73 additions
and
23 deletions
doc/man/man5/slapd.conf.5
+
32
−
15
View file @
4645eeb5
...
...
@@ -298,7 +298,7 @@ anonymous | users | [dn[.<style>]=]<pattern> | group[/oc[/at]]=<pattern>
with
.RS
.TP
<style> ::= exact | base | one | subtree | children | regex | anonymous
<style> ::= exact | base | one
level
| subtree | children | regex | anonymous
.RE
The term
...
...
@@ -317,11 +317,11 @@ with
or
.B base
(which are synonyms), to require an exact match; with
.BR one,
.BR one
level
,
to require exactly one level of depth match; with
.BR subtree,
.BR subtree
,
to allow any level of depth match, including the exact match; with
.BR children,
.BR children
,
to allow any level of depth match, not including the exact match;
.BR regex
explicitly requires the (default) match based on regular expression
...
...
@@ -359,7 +359,7 @@ whose DN exactly matches
The currently supported limits are
.B size
and
.BR time.
.BR time
.
The syntax for time limits is
.BR time[.{soft|hard}]=<integer> ,
...
...
@@ -370,11 +370,17 @@ If no time limit is explicitly requested by the client, the
.BR soft
limit is used; if the requested time limit exceeds the
.BR hard
limit, an "Administrative limit exceeded" is returned.
limit, an
.I \"Administrative limit exceeded\"
is returned.
If the
.BR hard
limit is set to 0 or to the keyword "soft", the soft limit is used
in either case; if it is set to -1 or to the keyword "none",
limit is set to 0 or to the keyword
.IR soft ,
the soft limit is used in either case; if it is set to
.I -1
or to the keyword
.IR none ,
no hard limit is enforced.
Explicit requests for time limits smaller or equal to the
.BR hard
...
...
@@ -395,11 +401,17 @@ If no size limit is explicitly requested by the client, the
.BR soft
limit is used; if the requested size limit exceeds the
.BR hard
limit, an "Administrative limit exceeded" is returned.
limit, an
.I \"Administrative limit exceeded\"
is returned.
If the
.BR hard
limit is set to 0 or to the keyword "soft", the soft limit is used
in either case; if it is set to -1 or to the keyword "none",
limit is set to 0 or to the keyword
.IR soft ,
the soft limit is used in either case; if it is set to
.I -1
or to the keyword
.IR none ,
no hard limit is enforced.
Explicit requests for size limits smaller or equal to the
.BR hard
...
...
@@ -410,8 +422,13 @@ flag sets a limit on the number of candidates a search request is allowed
to examine.
If the selected candidates exceed the
.BR unchecked
limit, the search will abort with "Unwilling to perform".
If it is set to -1 or to the keyword "none", no limit is applied (the default).
limit, the search will abort with
.IR \"Unwilling to perform\" .
If it is set to
.I -1
or to the keyword
.IR none ,
no limit is applied (the default).
If no flag is set, the value is assigned to the
.BR soft
limit, and the
...
...
@@ -420,7 +437,7 @@ limit is set to zero, to preserve the original behavior.
In case of no match, the global limits are used.
The default values are the same of
.B
R
sizelimit
.B sizelimit
and
.BR timelimit ;
no limit is set on
...
...
@@ -433,7 +450,7 @@ control is defined, additional size limits may be enforced; the syntax is
where
.BR integer
is the max page size if no explicit limit is set; the keyword
.
B
R noEstimate
.
I
R noEstimate
inhibits the server to return an estimate of the total number
of entries that will be returned.
.RE
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/limits.c
+
41
−
8
View file @
4645eeb5
...
...
@@ -310,18 +310,19 @@ parse_limits(
*
* "anonymous"
* "users"
* [ "dn" [ "." { "exact" | "base" | "one" | "sub" | children"
* [ "dn" [ "." { "exact" | "base" | "one
level
" | "sub
tree
" | children"
* | "regex" | "anonymous" } ] "=" ] <dn pattern>
*
* Note:
* "exact" and "base" are the same (exact match);
* "one" means exactly one rdn below, NOT including
the
pattern
* "sub" means any rdn below, including
the
pattern
* "children" means any rdn below, NOT including
the
pattern
* "one
level
" means exactly one rdn below, NOT including pattern
* "sub
tree
" means any rdn below, including pattern
* "children" means any rdn below, NOT including pattern
*
* "anonymous" may be deprecated in favour
* of the pattern = "anonymous" form
*
* "group[/objectClass[/attributeType]]" "=" "<dn pattern>"
*
* <limit>:
*
...
...
@@ -355,10 +356,42 @@ parse_limits(
}
else
if
(
strncasecmp
(
pattern
,
"one"
,
sizeof
(
"one"
)
-
1
)
==
0
)
{
flags
=
SLAP_LIMITS_ONE
;
pattern
+=
sizeof
(
"one"
)
-
1
;
if
(
strncasecmp
(
pattern
,
"level"
,
sizeof
(
"level"
)
-
1
)
==
0
)
{
pattern
+=
sizeof
(
"level"
)
-
1
;
}
else
if
(
strncasecmp
(
pattern
,
"subtree"
,
sizeof
(
"subtree"
)
-
1
)
==
0
)
{
}
else
{
#ifdef NEW_LOGGING
LDAP_LOG
(
CONFIG
,
WARNING
,
"%s : line %d: deprecated
\"
one
\"
style "
"
\"
limits <pattern> <limits>
\"
line; "
"use
\"
onelevel
\"
instead.
\n
"
,
fname
,
lineno
,
0
);
#else
Debug
(
LDAP_DEBUG_ANY
,
"%s : line %d: deprecated
\"
one
\"
style "
"
\"
limits <pattern> <limits>
\"
line; "
"use
\"
onelevel
\"
instead.
\n
"
,
fname
,
lineno
,
0
);
#endif
}
}
else
if
(
strncasecmp
(
pattern
,
"sub"
,
sizeof
(
"sub"
)
-
1
)
==
0
)
{
flags
=
SLAP_LIMITS_SUBTREE
;
pattern
+=
sizeof
(
"subtree"
)
-
1
;
pattern
+=
sizeof
(
"sub"
)
-
1
;
if
(
strncasecmp
(
pattern
,
"tree"
,
sizeof
(
"tree"
)
-
1
)
==
0
)
{
pattern
+=
sizeof
(
"tree"
)
-
1
;
}
else
{
#ifdef NEW_LOGGING
LDAP_LOG
(
CONFIG
,
WARNING
,
"%s : line %d: deprecated
\"
sub
\"
style "
"
\"
limits <pattern> <limits>
\"
line; "
"use
\"
subtree
\"
instead.
\n
"
,
fname
,
lineno
,
0
);
#else
Debug
(
LDAP_DEBUG_ANY
,
"%s : line %d: deprecated
\"
sub
\"
style "
"
\"
limits <pattern> <limits>
\"
line; "
"use
\"
subtree
\"
instead.
\n
"
,
fname
,
lineno
,
0
);
#endif
}
}
else
if
(
strncasecmp
(
pattern
,
"children"
,
sizeof
(
"children"
)
-
1
)
==
0
)
{
flags
=
SLAP_LIMITS_CHILDREN
;
...
...
@@ -392,13 +425,13 @@ parse_limits(
#ifdef NEW_LOGGING
LDAP_LOG
(
CONFIG
,
CRIT
,
"%s : line %d: missing '=' in "
"
\"
dn[.{exact|base|one|subtree"
"
\"
dn[.{exact|base|one
level
|subtree"
"|children|regex|anonymous}]"
"=<pattern>
\"
in "
"
\"
limits <pattern> <limits>
\"
line.
\n
"
,
fname
,
lineno
,
0
);
#else
Debug
(
LDAP_DEBUG_ANY
,
"%s : line %d: missing '=' in "
"
\"
dn[.{exact|base|one|subtree"
"
\"
dn[.{exact|base|one
level
|subtree"
"|children|regex|anonymous}]"
"=<pattern>
\"
in "
"
\"
limits <pattern> <limits>
\"
"
...
...
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