Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
Raise an exception if we cannot find a matching principal.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrusdaboo committed May 21, 2007
1 parent 0471bd4 commit 2d8fdf1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/kerberosgss.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ char* server_principal_details(const char* service, const char* hostname)
krb5_free_keytab_entry_contents(kcontext, &entry);
}

if (result == NULL)
{
PyErr_SetObject(KrbException_class, Py_BuildValue("((s:i))",
"Principal not found in keytab", -1));
}

end:
if (cursor)
krb5_kt_end_seq_get(kcontext, kt, &cursor);
Expand Down

0 comments on commit 2d8fdf1

Please sign in to comment.