svn rev #22297: trunk/src/lib/krb5/keytab/
ghudson@MIT.EDU
ghudson at MIT.EDU
Thu Apr 30 13:49:28 EDT 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22297
Commit By: ghudson
Log Message:
In krb5_kt_resolve, ensure that the output parameter is set to NULL on
failure even if the underlying resolver doesn't do that properly.
Changed Files:
U trunk/src/lib/krb5/keytab/ktbase.c
Modified: trunk/src/lib/krb5/keytab/ktbase.c
===================================================================
--- trunk/src/lib/krb5/keytab/ktbase.c 2009-04-30 17:28:55 UTC (rev 22296)
+++ trunk/src/lib/krb5/keytab/ktbase.c 2009-04-30 17:49:28 UTC (rev 22297)
@@ -166,11 +166,13 @@
unsigned int pfxlen;
const char *cp, *resid;
krb5_error_code err = 0;
-
+ krb5_keytab id;
+
+ *ktid = NULL;
+
cp = strchr (name, ':');
- if (!cp) {
- return (*krb5_kt_dfl_ops.resolve)(context, name, ktid);
- }
+ if (!cp)
+ return (*krb5_kt_dfl_ops.resolve)(context, name, ktid);
pfxlen = cp - name;
@@ -209,7 +211,9 @@
k5_mutex_unlock(&kt_typehead_lock);
for (; tlist; tlist = tlist->next) {
if (strcmp (tlist->ops->prefix, pfx) == 0) {
- err = (*tlist->ops->resolve)(context, resid, ktid);
+ err = (*tlist->ops->resolve)(context, resid, &id);
+ if (!err)
+ *ktid = id;
goto cleanup;
}
}
More information about the cvs-krb5
mailing list