#47920 Encoding of SearchResultEntry is missing tag
Closed: wontfix Opened by npmccallum.

ldap/servers/slapd/result.c:2179 contains this:
ber_printf( ber, "{s{", slapi_entry_get_dn_const(e) );

However, the actual structure is:
SearchResultEntry ::= [APPLICATION 4] SEQUENCE {
objectName LDAPDN,
attributes PartialAttributeList
}

Notice that the Application 4 tag is missing.


Untested patch
tag.patch

The test case 'ticket47920_test.py' returns the following failure when the control is badly encoded:

{{{
Traceback (most recent call last):
File "/tmp/test2asn1.py", line 34, in
,,,resp_ctrls = l.result3(msg_id)
File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 469, in result3
resp_ctrl_classes=resp_ctrl_classes
File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 487, in result4
decoded_resp_ctrls = DecodeControlTuples(resp_ctrls,resp_ctrl_classes)
File "/usr/lib64/python2.7/site-packages/ldap/controls/init.py", line 141, in DecodeControlTuples
control.decodeControlValue(encodedControlValue)
File "/usr/lib64/python2.7/site-packages/ldap/controls/readentry.py", line 44, in decodeControlValue
decodedEntry,
= decoder.decode(encodedControlValue,asn1Spec=SearchResultEntry())
File "/usr/lib/python2.7/site-packages/pyasn1/codec/ber/decoder.py", line 739, in call
'%r not in asn1Spec: %r' % (tagSet, asn1Spec)
pyasn1.error.PyAsn1Error: TagSet(Tag(tagClass=0, tagFormat=32, tagId=16)) not in asn1Spec: SearchResultEntry()

}}}

Ticket has been cloned to Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1150694

'''master'''

''git merge ticket47920''

Updating 36381c1..c7a78f4
Fast-forward
dirsrvtests/tickets/ticket47920_test.py | 251 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ldap/servers/slapd/result.c | 2 +-
2 files changed, 252 insertions(+), 1 deletion(-)
create mode 100644 dirsrvtests/tickets/ticket47920_test.py

''git push origin master''

Counting objects: 16, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 3.43 KiB, done.
Total 9 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
36381c1..c7a78f4 master -> master

commit c7a78f442d6d18d20e23fda4afad8ddf2042a262
Author: Thierry bordaz (tbordaz) tbordaz@redhat.com
Date: Thu Oct 9 14:31:11 2014 +0200

'''1.3.3'''

''git cherry-pick c7a78f442d6d18d20e23fda4afad8ddf2042a262''
[389-ds-base-1.3.3 90939dc] Ticket 47920: Encoding of SearchResultEntry is missing tag
2 files changed, 252 insertions(+), 1 deletion(-)
create mode 100644 dirsrvtests/tickets/ticket47920_test.py

''git push origin 389-ds-base-1.3.3''

Counting objects: 16, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 3.43 KiB, done.
Total 9 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
7df1729..90939dc 389-ds-base-1.3.3 -> 389-ds-base-1.3.3

commit 90939dc9c965ea1cb88b88eec0cb735ab97ae551
Author: Thierry bordaz (tbordaz) tbordaz@redhat.com
Date: Thu Oct 9 14:31:11 2014 +0200

'''1.3.2'''

''git cherry-pick c7a78f442d6d18d20e23fda4afad8ddf2042a262''
[389-ds-base-1.3.2 78feffc] Ticket 47920: Encoding of SearchResultEntry is missing tag
2 files changed, 252 insertions(+), 1 deletion(-)
create mode 100644 dirsrvtests/tickets/ticket47920_test.py

''git push origin 389-ds-base-1.3.2''

Counting objects: 16, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (9/9), 3.35 KiB, done.
Total 9 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
65c73b4..78feffc 389-ds-base-1.3.2 -> 389-ds-base-1.3.2

commit 78feffcd9666f2f01bb0b79044e9cd25d72b99a6
Author: Thierry bordaz (tbordaz) tbordaz@redhat.com
Date: Thu Oct 9 14:31:11 2014 +0200

Metadata Update from @tbordaz:
- Issue assigned to tbordaz
- Issue set to the milestone: 1.3.2.24

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1251

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

Metadata