Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
267486bf
Commit
267486bf
authored
Apr 06, 2006
by
Pierangelo Masarati
Browse files
fix ITS#4479
parent
8fb8b17c
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/slapd/limits.c
View file @
267486bf
...
...
@@ -1287,6 +1287,9 @@ limits_check( Operation *op, SlapReply *rs )
return
-
1
;
}
op
->
ors_slimit
=
slimit
;
}
else
if
(
slimit
==
0
)
{
op
->
ors_slimit
=
0
;
}
}
else
{
...
...
tests/scripts/test025-limits
View file @
267486bf
...
...
@@ -1359,6 +1359,52 @@ case $RC in
;;
esac
# ITS#4479
PAGESIZE
=
1
SIZELIMIT
=
2
echo
"Testing size limit request (
$SIZELIMIT
) for unlimited ID and pagesize=
$PAGESIZE
..."
$LDAPRSEARCH
-S
""
-b
"
$BASEDN
"
-h
$LOCALHOST
-p
$PORT1
-w
secret
-z
$SIZELIMIT
\
-D
'cn=Unlimited User,ou=People,dc=example,dc=com'
\
-E
'!pr='
$PAGESIZE
'/noprompt'
'(objectClass=*)'
>
$SEARCHOUT
2>&1
RC
=
$?
COUNT
=
`
awk
'/^# numEntries:/ {print $3}'
$SEARCHOUT
`
case
$RC
in
0
)
if
test
x
"
$COUNT
"
!=
x
;
then
if
test
"
$COUNT
"
-gt
"
$SIZELIMIT
"
;
then
echo
"...error: got
$COUNT
entries instead of the requested
$SIZELIMIT
"
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
1
fi
echo
"...didn't bump into the requested size limit (
$SIZELIMIT
; got
$COUNT
entries)"
else
echo
"...error: did not expect ldapsearch success (
$RC
)!"
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
1
fi
;;
4
)
if
test
x
"
$COUNT
"
!=
x
;
then
if
test
$COUNT
=
$SIZELIMIT
;
then
echo
"...bumped into requested size limit (
$SIZELIMIT
)"
else
echo
"...error: got
$COUNT
entries while requesting
$SIZELIMIT
..."
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
$RC
fi
else
echo
"...error: bumped into server-side size limit, but got no entries!"
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
$RC
fi
;;
*
)
echo
"ldapsearch failed (
$RC
)!"
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
$RC
;;
esac
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
echo
">>>>> Test succeeded"
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment