Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have krb5.init_context() raise an exception on error. (#22)
init_context() currently just returns a null pointer if the C routine fails, which is unlike the norm in this module and I assume is an oversight. Typically this will fail if there's a syntax error in the libkrb5 configuration (/etc/krb5.conf, or whatever is read). A program I wrote segfaulted in this situation, because I then passed the null context to other routines. With this change, we get instead: In [2]: ctx = krb5.init_context() --------------------------------------------------------------------------- Krb5Error Traceback (most recent call last) ... Krb5Error: Included profile file could not be read -1429577697
- Loading branch information