summaryrefslogtreecommitdiffstats
path: root/src/lib/gssapi
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-02-06 23:19:08 +0000
committerGreg Hudson <ghudson@mit.edu>2012-02-06 23:19:08 +0000
commit08d7bd5e79f8b895405ba375947c8b825976c837 (patch)
treee1d81cb637808d2f2776db7f785f62b7d1636526 /src/lib/gssapi
parent0539083523ab487a9d05cedc637a1bcafa20168c (diff)
downloadkrb5-08d7bd5e79f8b895405ba375947c8b825976c837.tar.gz
krb5-08d7bd5e79f8b895405ba375947c8b825976c837.tar.xz
krb5-08d7bd5e79f8b895405ba375947c8b825976c837.zip
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. ticket: 7087 status: open target_version: 1.10.1 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25674 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/gssapi')
-rw-r--r--src/lib/gssapi/krb5/naming_exts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/gssapi/krb5/naming_exts.c b/src/lib/gssapi/krb5/naming_exts.c
index 725d801dd..f48b1cbbf 100644
--- a/src/lib/gssapi/krb5/naming_exts.c
+++ b/src/lib/gssapi/krb5/naming_exts.c
@@ -387,7 +387,7 @@ krb5_gss_get_name_attribute(OM_uint32 *minor_status,
*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);