[CalendarServer-changes] [1541] PyKerberos/trunk/src/kerberosgss.c

source_changes at macosforge.org source_changes at macosforge.org
Mon May 21 11:01:59 PDT 2007


Revision: 1541
          http://trac.macosforge.org/projects/calendarserver/changeset/1541
Author:   cdaboo at 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:
--------------
    PyKerberos/trunk/src/kerberosgss.c

Modified: PyKerberos/trunk/src/kerberosgss.c
===================================================================
--- 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);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070521/3573b5bb/attachment.html


More information about the calendarserver-changes mailing list