Bug 204566
| Summary: | Adjustment for new LDAP C SDK (ber_get_next_buffer_ext) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Retired] 389 | Reporter: | Noriko Hosoi <nhosoi> | ||||||||
| Component: | Directory Server | Assignee: | Noriko Hosoi <nhosoi> | ||||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Viktor Ashirov <vashirov> | ||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | medium | ||||||||||
| Version: | 1.0.2 | CC: | nkinder, rmeggins | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2015-12-07 17:16:03 UTC | Type: | --- | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | |||||||||||
| Bug Blocks: | 152373, 208654, 240316 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Noriko Hosoi
2006-08-30 01:05:52 UTC
Created attachment 135178 [details]
cvs diff ldapserver/ldap/servers/slapd/connection.c
File:
ldapserver/ldap/servers/slapd/connection.c
Changes:
1) When ber_get_next_buffer_ext fails, not just LBER_DEFAULT but
LBER_OVERFLOW can be set to the ber tag. Thus, LBER_OVERFLOW is also
checked in the error check now.
2) The too large length error used be checked as "errno == EMSGSIZE",
which is replaced with "tag == LBER_OVERFLOW"
3) When the too large length error occurs, the following error was logged
in the errors log, which was not appropriate since increasing
nsslapd-maxbersize did not solve the problem.
connection - conn=7 fd=65 Incoming BER Element was too long, max
allowable is 2097152 bytes. Change the nsslapd-maxbersize attribute
in cn=config to increase.
Removed the error logging.
4) When the error occurs, B2 (== SLAPD_DISCONNECT_BER_TOO_BIG) is added
at the end of the closed error in the access log. Error code EMSGSIZE
and its description has been added:
conn=7 op=-1 fd=65 closed error 90 (Message too long) - B2
In general, you should use ber_tag_t instead of int tag, and ber_len_t or ber_slen_t for lengths, which I think should be Bytes_Scanned, Bytes_Read, and ber_len. Same with the arguments to get_next_from_buffer - use ber types. Otherwise, looks good. The proposed fix looks good to me. I agree with Rich's comments about using ber types, but you don't have to deal with them in this bug. I've already addressed using the proper ber types in this code in my proposed fix for bug 204517. Created attachment 135348 [details]
cvs diff ldapserver/ldap/servers/slapd/connection.c
Updated my local tree to merge with the Nathan's checkin for [204517].
No changes for this bug.
Created attachment 135349 [details]
cvs commit message
Thanks for the review, Rich and Nathan.
Checked in.
Verification steps: 1. Create bug624390a.ldif as described in TET/smrepl/smrepl.ksh bug624390a test case, 2. Add the ldif: ldapmodify -D "cn=Directory Manager" -w ps -a -f ./bug624390a.ldif 3. Check the access log: [..] conn=2 fd=64 slot=64 connection from 127.0.0.1 to 127.0.0.1 [..] conn=2 op=0 BIND dn="cn=Directory Manager" method=128 version=3 [..] conn=2 op=0 RESULT err=0 tag=97 nentries=0 etime=0 dn="cn=directory manager" [..] conn=2 op=-1 fd=64 closed error 90 (Message too long) - B2 If yo usee "Message too long", the server is working as expected. I.e., verified. |