summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2010-06-22 13:55:02 -0700
committerNoriko Hosoi <nhosoi@redhat.com>2010-06-22 13:55:02 -0700
commitee751718a4e99f49c935aef06e309886e1f5beca (patch)
tree43c9e1a33f564c33fa38746545a833f68134f295
parent10966f3cfe9a60ac385ca76bc331fa292da7b888 (diff)
downloadds-ee751718a4e99f49c935aef06e309886e1f5beca.tar.gz
ds-ee751718a4e99f49c935aef06e309886e1f5beca.tar.xz
ds-ee751718a4e99f49c935aef06e309886e1f5beca.zip
606920 - anonymous resource limit - nstimelimit -
also applied to "cn=directory manager" https://bugzilla.redhat.com/show_bug.cgi?id=606920 Description: When a timelimit (as well as a sizelimit) is successfully retrieved from SLAPIResLimitConnData, the value is always set to pblock. With this change, it sets "no limit (-1)" if the operation is initiated by Directory Manager.
-rw-r--r--ldap/servers/slapd/opshared.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/ldap/servers/slapd/opshared.c b/ldap/servers/slapd/opshared.c
index e07888c0..d06dd2da 100644
--- a/ldap/servers/slapd/opshared.c
+++ b/ldap/servers/slapd/opshared.c
@@ -1370,12 +1370,14 @@ compute_limits (Slapi_PBlock *pb)
}
}
- if ( requested_timelimit == 0 ) {
- timelimit = ( max_timelimit == -1 ) ? -1 : max_timelimit;
+ if ( isroot ) {
+ timelimit = max_timelimit = -1; /* no limit */
+ } else if ( requested_timelimit == 0 ) {
+ timelimit = ( max_timelimit == -1 ) ? -1 : max_timelimit;
} else if ( max_timelimit == -1 || requested_timelimit < max_timelimit ) {
- timelimit = requested_timelimit;
+ timelimit = requested_timelimit;
} else {
- timelimit = max_timelimit;
+ timelimit = max_timelimit;
}
set_timelimit:
@@ -1399,12 +1401,14 @@ compute_limits (Slapi_PBlock *pb)
}
}
- if ( requested_sizelimit == 0 ) {
- sizelimit = ( max_sizelimit == -1 ) ? -1 : max_sizelimit;
+ if ( isroot ) {
+ sizelimit = max_sizelimit = -1;
+ } else if ( requested_sizelimit == 0 ) {
+ sizelimit = ( max_sizelimit == -1 ) ? -1 : max_sizelimit;
} else if ( max_sizelimit == -1 || requested_sizelimit < max_sizelimit ) {
- sizelimit = requested_sizelimit;
+ sizelimit = requested_sizelimit;
} else {
- sizelimit = max_sizelimit;
+ sizelimit = max_sizelimit;
}
slapi_pblock_set(pb, SLAPI_SEARCH_SIZELIMIT, &sizelimit);