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
6a5b253b
Commit
6a5b253b
authored
23 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
allow multiple limits setting on one global/per backend config line
parent
4919363f
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
+4
-2
4 additions, 2 deletions
doc/man/man5/slapd.conf.5
servers/slapd/config.c
+44
-32
44 additions, 32 deletions
servers/slapd/config.c
with
48 additions
and
34 deletions
doc/man/man5/slapd.conf.5
+
4
−
2
View file @
6a5b253b
...
...
@@ -512,10 +512,11 @@ e.g. ldapi:// (and eventually IPSEC). It is not normally used.
.TP
.B sizelimit <integer>
.TP
.B sizelimit size[.{soft|hard|unchecked}]=<integer>
.B sizelimit size[.{soft|hard|unchecked}]=<integer>
[...]
Specify the maximum number of entries to return from a search operation.
The default size limit is 500.
The second format allows a fine grain setting of the size limits.
Extra args can be added on the same line.
See
.BR limits
for an explanation of the different flags.
...
...
@@ -539,11 +540,12 @@ The default is 32.
.TP
.B timelimit <integer>
.TP
.B timelimit time[.{soft|hard}]=<integer>
.B timelimit time[.{soft|hard}]=<integer>
[...]
Specify the maximum number of seconds (in real time)
.B slapd
will spend answering a search request. The default time limit is 3600.
The second format allows a fine grain setting of the time limits.
Extra args can be added on the same line.
See
.BR limits
for an explanation of the different flags.
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/config.c
+
44
−
32
View file @
6a5b253b
...
...
@@ -694,7 +694,7 @@ read_config( const char *fname )
/* set size limit */
}
else
if
(
strcasecmp
(
cargv
[
0
],
"sizelimit"
)
==
0
)
{
int
rc
=
0
;
int
rc
=
0
,
i
;
struct
slap_limits_set
*
lim
;
if
(
cargc
<
2
)
{
...
...
@@ -717,30 +717,36 @@ read_config( const char *fname )
lim
=
&
be
->
be_def_limit
;
}
if
(
strncasecmp
(
cargv
[
1
],
"size"
,
4
)
==
0
)
{
rc
=
parse_limit
(
cargv
[
1
],
lim
);
}
else
{
lim
->
lms_s_soft
=
atoi
(
cargv
[
1
]
);
lim
->
lms_s_hard
=
0
;
}
for
(
i
=
1
;
i
<
cargc
;
i
++
)
{
if
(
strncasecmp
(
cargv
[
i
],
"size"
,
4
)
==
0
)
{
rc
=
parse_limit
(
cargv
[
i
],
lim
);
}
else
{
lim
->
lms_s_soft
=
atoi
(
cargv
[
i
]
);
lim
->
lms_s_hard
=
0
;
}
if
(
rc
)
{
if
(
rc
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"config"
,
LDAP_LEVEL_CRIT
,
"%s: line %d: unable to parse value"
"
\"
%s
\"
in
\"
sizelimit <limit>
\"
"
" line.
\n
"
,
fname
,
lineno
,
cargv
[
1
]
));
LDAP_LOG
((
"config"
,
LDAP_LEVEL_CRIT
,
"%s: line %d: unable "
"to parse value
\"
%s
\"
"
"in
\"
sizelimit "
"<limit>
\"
line.
\n
"
,
fname
,
lineno
,
cargv
[
i
]
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"%s: line %d: unable to parse value
\"
%s
\"
in
\"
sizelimit <limit>
\"
line
\n
"
,
fname
,
lineno
,
cargv
[
1
]
);
Debug
(
LDAP_DEBUG_ANY
,
"%s: line %d: unable "
"to parse value
\"
%s
\"
"
"in
\"
sizelimit "
"<limit>
\"
line
\n
"
,
fname
,
lineno
,
cargv
[
i
]
);
#endif
}
}
/* set time limit */
}
else
if
(
strcasecmp
(
cargv
[
0
],
"timelimit"
)
==
0
)
{
int
rc
=
0
;
int
rc
=
0
,
i
;
struct
slap_limits_set
*
lim
;
if
(
cargc
<
2
)
{
...
...
@@ -763,25 +769,31 @@ read_config( const char *fname )
lim
=
&
be
->
be_def_limit
;
}
if
(
strncasecmp
(
cargv
[
1
],
"time"
,
4
)
==
0
)
{
rc
=
parse_limit
(
cargv
[
1
],
lim
);
}
else
{
lim
->
lms_t_soft
=
atoi
(
cargv
[
1
]
);
lim
->
lms_t_hard
=
0
;
}
for
(
i
=
1
;
i
<
cargc
;
i
++
)
{
if
(
strncasecmp
(
cargv
[
i
],
"time"
,
4
)
==
0
)
{
rc
=
parse_limit
(
cargv
[
i
],
lim
);
}
else
{
lim
->
lms_t_soft
=
atoi
(
cargv
[
i
]
);
lim
->
lms_t_hard
=
0
;
}
if
(
rc
)
{
if
(
rc
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"config"
,
LDAP_LEVEL_CRIT
,
"%s: line %d: unable to parse value"
"
\"
%s
\"
in
\"
timelimit <limit>
\"
"
" line.
\n
"
,
fname
,
lineno
,
cargv
[
1
]
));
LDAP_LOG
((
"config"
,
LDAP_LEVEL_CRIT
,
"%s: line %d: unable "
"to parse value
\"
%s
\"
"
"in
\"
timelimit "
"<limit>
\"
line.
\n
"
,
fname
,
lineno
,
cargv
[
i
]
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"%s: line %d: unable to parse value
\"
%s
\"
in
\"
timelimit <limit>
\"
line
\n
"
,
fname
,
lineno
,
cargv
[
1
]
);
Debug
(
LDAP_DEBUG_ANY
,
"%s: line %d: unable "
"to parse value
\"
%s
\"
"
"in
\"
timelimit "
"<limit>
\"
line
\n
"
,
fname
,
lineno
,
cargv
[
i
]
);
#endif
}
}
/* set regex-based 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