Revision
1541
Author
cdaboo@apple.com
Date
2007-05-21 11:01:59 -0700 (Mon, 21 May 2007)

Log Message

Raise an exception if we cannot find a matching principal.

Modified Paths

Diff

Modified: PyKerberos/trunk/src/kerberosgss.c (1540 => 1541)


--- PyKerberos/trunk/src/kerberosgss.c	2007-05-18 13:53:27 UTC (rev 1540)
+++ PyKerberos/trunk/src/kerberosgss.c	2007-05-21 18:01:59 UTC (rev 1541)
@@ -90,6 +90,12 @@
       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);