summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2012-08-06 20:23:53 -0400
committerSimo Sorce <simo@redhat.com>2012-08-06 20:27:00 -0400
commitdc7518065f63696adc3895fd010ee033f148c8a0 (patch)
tree98bcf7aec6ef12a5db7bfa7cd6a5ae186d6b778b
parentbade7952d232adbc7ebed6a3bf2d4707d608128a (diff)
downloadgss-proxy-dc7518065f63696adc3895fd010ee033f148c8a0.tar.gz
gss-proxy-dc7518065f63696adc3895fd010ee033f148c8a0.tar.xz
gss-proxy-dc7518065f63696adc3895fd010ee033f148c8a0.zip
Output type can be null in gss_display_name
-rw-r--r--proxy/src/mechglue/gpm_import_and_canon_name.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/proxy/src/mechglue/gpm_import_and_canon_name.c b/proxy/src/mechglue/gpm_import_and_canon_name.c
index 61abbbc..c5a5ba1 100644
--- a/proxy/src/mechglue/gpm_import_and_canon_name.c
+++ b/proxy/src/mechglue/gpm_import_and_canon_name.c
@@ -47,7 +47,7 @@ OM_uint32 gpm_display_name(OM_uint32 *minor_status,
if (!input_name) {
return GSS_S_CALL_INACCESSIBLE_READ;
}
- if (!output_name_buffer || !output_name_type) {
+ if (!output_name_buffer) {
return GSS_S_CALL_INACCESSIBLE_WRITE;
}
@@ -83,12 +83,14 @@ OM_uint32 gpm_display_name(OM_uint32 *minor_status,
goto done;
}
- ret = gp_conv_gssx_to_oid_alloc(&name->name_type, output_name_type);
- if (ret) {
- gss_release_buffer(&discard, output_name_buffer);
- ret_min = ret;
- ret_maj = GSS_S_FAILURE;
- goto done;
+ if (output_name_type) {
+ ret = gp_conv_gssx_to_oid_alloc(&name->name_type, output_name_type);
+ if (ret) {
+ gss_release_buffer(&discard, output_name_buffer);
+ ret_min = ret;
+ ret_maj = GSS_S_FAILURE;
+ goto done;
+ }
}
ret_min = 0;