Skip to content

Hopefully fix test issues around high-level mechanism support and indicate/inquire mechs. #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 3, 2018

Conversation

cipherboy
Copy link
Contributor

Fixes some issues found by the NTLM mechs:

  • NTLM mechs have empty-but-present SASL names and descriptions
  • Dotted form fallback isn't handled correctly when SASL name is empty
  • Last seen attribute isn't necessarily sufficient for mech attribute inquiry.

Hopefully these behave a little better. :)

Validate that sasl_name is nonempty before assigning it to base;
this prevents the situation where the sasl_name query succeeds,
but the contents of the name are empty.

Signed-off-by: Alexander Scheel <[email protected]>
Copy link
Member

@DirectXMan12 DirectXMan12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments inline, mainly around comments

attrs = set([last_attr])
if mech_attr not in attrs_dict:
attrs_dict[mech_attr] = 0
attrs_dict[mech_attr] += 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment above needs to reflect the commit message comments to explain what's going on here.
Also, don't you need to ensure that last_mech actually has the attr -- maybe we should record the mechs that have each attr?

@DirectXMan12
Copy link
Member

Also, please give a better PR title ;-)

In particular, sasl names and descriptions can be empty for
some mechanisms (NTLM in particular); do not fail the test
suite because they are empty.

Signed-off-by: Alexander Scheel <[email protected]>
While this can still fail, less likely to fail than querying
on the last-seen attr. In particular, some mechanisms will not
respond to an inquiry for that attr despite claiming to have it.

Signed-off-by: Alexander Scheel <[email protected]>
@cipherboy cipherboy changed the title Fix master Hopefully fix test issues around high-level mechanism support and indicate/inquire mechs. Oct 3, 2018
@DirectXMan12
Copy link
Member

Looks reasonable to me. @frozencemetery can you take a gander, then we can merge?

@frozencemetery frozencemetery merged commit 0eeeee5 into pythongssapi:master Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants