svn rev #25674: trunk/src/lib/gssapi/krb5/

ghudson@MIT.EDU ghudson at MIT.EDU
Mon Feb 6 18:19:09 EST 2012


http://src.mit.edu/fisheye/changelog/krb5/?cs=25674
Commit By: ghudson
Log Message:
ticket: 7087
status: open
target_version: 1.10.1
tags: pullup

Set display_value in krb5_gss_get_name_attribute

A backwards conditional in r25358 caused krb5_gss_get_name_attribute
not to set display_value on success.  Fix the sense of the
conditional.

We still don't quite correctly handle the cases where data_to_gss()
fails, but those should be rare and the problem in those cases isn't
severe, so it can be fixed separately.

Also, value and display_value should probably be initialized to null
buffers on failure, as is common with GSS interfaces.


Changed Files:
U   trunk/src/lib/gssapi/krb5/naming_exts.c
Modified: trunk/src/lib/gssapi/krb5/naming_exts.c
===================================================================
--- trunk/src/lib/gssapi/krb5/naming_exts.c	2012-02-06 21:03:23 UTC (rev 25673)
+++ trunk/src/lib/gssapi/krb5/naming_exts.c	2012-02-06 23:19:08 UTC (rev 25674)
@@ -387,7 +387,7 @@
             *complete = kcomplete;
 
         if (display_value != NULL) {
-            if (code != 0)
+            if (code == 0)
                 code = data_to_gss(&kdisplay_value, display_value);
             else
                 free(kdisplay_value.data);



More information about the cvs-krb5 mailing list