Skip to content

Commit

Permalink
Docs: Warn about display_as
Browse files Browse the repository at this point in the history
This commit warns about the potential issues (segfaults with
krb5 < 1.13.3 and incorrect behavior with canonicalized names)
in the inline docs for `display_as`.

Fixes #79
  • Loading branch information
DirectXMan12 committed Sep 4, 2015
1 parent 3f45cbe commit 5d8d67f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions gssapi/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,21 @@ def display_as(self, name_type):
This method attempts to display the current :class:`Name`
using the syntax of the given :class:`NameType`, if possible.
Warning:
In MIT krb5 versions below 1.13.3, this method can segfault if
the name was not *originally* created with a `name_type` that was
not ``None`` (even in cases when a ``name_type``
is later "added", such as via :meth:`canonicalize`).
**Do not use this method unless you are sure the above
conditions can never happen in your code.**
Warning:
In addition to the above warning, current versions of MIT krb5 do
not actually fully implement this method, and it may return
incorrect results in the case of canonicalized names.
:requires-ext:`rfc6680`
Args:
Expand Down

0 comments on commit 5d8d67f

Please sign in to comment.