RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1099891 - Client.start should return None initial response for CRAM-MD5 method
Summary: Client.start should return None initial response for CRAM-MD5 method
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: saslwrapper
Version: 6.4
Hardware: All
OS: All
medium
medium
Target Milestone: rc
: ---
Assignee: Mike Cressman
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
: 1089627 (view as bug list)
Depends On:
Blocks: 804616 1075802 1089627 1172231 1269194
TreeView+ depends on / blocked
 
Reported: 2014-05-21 12:20 UTC by Pavel Moravec
Modified: 2020-06-11 12:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-15 18:24:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Moravec 2014-05-21 12:20:28 UTC
Description of problem:
bz804616 is caused by the fact that:

    status, mech, initial = self._cli.start(str(mechanisms))

returns to "initial" an empty string also for CRAM-MD5 (and DIGEST-MD5) mechanisms. While it has to return None there. See https://issues.apache.org/jira/browse/QPID-3522 for some more background.


Version-Release number of selected component (if applicable):
0.22-5.el6


How reproducible:
100%


Steps to Reproduce:
1) Execute simple python script:

from saslwrapper import Client as _Client
_cli = _Client()

mechanisms = ['CRAM-MD5', 'PLAIN']
print "supplied mechs=%s" %mechanisms
_cli.setAttr('username', 'guest')
_cli.setAttr('externaluser', 'guest')
_cli.setAttr('password', 'guest')
_cli.setAttr('host', 'localhost')
_cli.setAttr('service', 'qpidd')
status = _cli.init()
print "saslwrapper.init: status='%s'" %status
status, mech, initial = _cli.start(str(mechanisms))
print "saslwrapper.start: mech='%s', status='%s', initial='%s'" %(mech, status, initial)


Actual results:
Latest line of output is:
saslwrapper.start: mech='CRAM-MD5', status='True', initial=''


Expected results:
Latest line of output should be:
saslwrapper.start: mech='CRAM-MD5', status='True', initial='None'


Additional info:
Another reproducer: once this is fixed, python-qpid will support CRAM-MD5 mechanism, so you can test it e.g. by:

qpid-stat -q -b guest/guest@localhost:5672 --sasl-mechanism=CRAM-MD5


Be aware, EXTERNAL mechanism still requires empty string initial response

Comment 1 Pavel Moravec 2014-05-22 13:47:10 UTC
Trivial necessary change that does not suffice:

in saslwrapper-0.22/src/cyrus/saslwrapper.cpp, ClientImpl::start:


    if (resp)
        initialResponse = string(resp, len);

BUT if resp==null, we need to set pointer to initialResponse to null - this cant be done with current interface of the method.

Comment 4 Justin Ross 2014-06-23 18:49:41 UTC
*** Bug 1089627 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.