[Date Prev][Date Next] [Chronological] [Thread] [Top]

str2result() and slapd-sock


I'm trying to find out why slapd-socks always outputs all lines returned by
the external sock listeners with comment "unknown" although everything seems
to work correctly.

----------------------------- snip -----------------------------
5603fc08 conn=1000 op=1 BIND dn="uid=äöüÄÖÜß,ou=realdb,dc=example,dc=org"
5603fc08 str2result (msgid: 2
code: 49
matched: uid=äöüÄÖÜß,ou=realdb,dc=example,dc=org
info: You loose! (wrong password)

) unknown
5603fc08 str2result (
) unknown
5603fc08 conn=1000 op=1 RESULT tag=97 err=49 text= You loose! (wrong password)
----------------------------- snip -----------------------------

The (correct) Python string returned by the listener was:

'RESULT\nmsgid: 2\ncode: 49\nmatched:
You loose! (wrong password)\n\n'

I tried to understand what's going on in str2result()
(in file servers/slapd/result.c) but failed.

AFAICS in slapd-sock(5) the external listener should always return a line with
"code: <digit>" after the "RESULT" line. But to me it seems that the function
would return with rc=0 if there's only a single "RESULT" line (due to break in
line 1674).

And I also can't see why the else clause in 1727 is reached.
I wonder whether slapd-sock is confused by the two trailing line feeds.

Ciao, Michael.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature