Closed
Bug 351287
Opened 19 years ago
Closed 2 months ago
ldap_abandon_ext does not check if connection is established
Categories
(Directory Graveyard :: LDAP C SDK, defect)
Directory Graveyard
LDAP C SDK
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: ludwig.krispenz, Assigned: mcs)
Details
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20050530
Build Identifier: lap c sdk 5.08
If ldap_abandon_ext is called as the first operation on an ldap connection, it writes some bytes to fd=0 ( printing garbage to the display) and returns success.
Although this is not a reasonable usage, the lib should be robust enough to deal with it and check if a conn exists before trying to use it.
stack from an example app: [1] _ti_write(0x0, 0x479bc, 0x8, 0x479fe, 0x0, 0xfffffffffffffffc), at 0xff05d7d4
[2] ber_flush(0x46ee0, 0x47898, 0x1, 0xfeec2440, 0x19, 0xffbed5ec), at 0xff389ab0
[3] nsldapi_ber_flush(0x46d28, 0x46ee0, 0x47898, 0x1, 0x0, 0x74), at 0xff378ba8
[4] do_abandon(0x0, 0x0, 0x0, 0x0, 0x0, 0x20), at 0xff365a14
[5] ldap_abandon_ext(0x46d28, 0x0, 0x0, 0x0, 0x2d, 0x20), at 0xff365528
=>[6] doOp(line = 0xffbf1cc0 "[08/Aug/2006:08:59:18 -0500] conn=1797456 op=2 msgId=3 - ABANDON targetop=NOTFOUND msgid=2\n", stat = (nil), lds = 0xffbfacf8), line 445 in "playbackTool.c"
[7] main(argc = 8, argv = 0xffbfee5c), line 1039 in "playbackTool.c"
Reproducible: Always
Steps to Reproduce:
1. ldap_init()
2. ldap_abandon_ext()
3.
Actual Results:
write garbage to terminal :
write(0, " 006020103 P01\0", 8) = 8
return = 0
Expected Results:
retur = 81 (or 91)
Assignee | ||
Comment 1•19 years ago
|
||
I agree that libldap should handle this better. Looking at the code, I am surprised any output was generated (I would expect that do_abandon() would not find a request that matches the message ID and therefore would do nothing).
Reporter | ||
Comment 2•19 years ago
|
||
(In reply to comment #1)
I don't know and when the info about message ids is stored, but the app theat produced this result did the following:
Take a log from an ldap server and replay the ops. When the ldap server is down, the first ops bind, srch ... return 91, only the abandon just writes to fd=0 and returns 0.
Updated•2 months ago
|
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•