summaryrefslogtreecommitdiffstats
path: root/lib/libgssapi
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2007-07-05 13:40:07 +0000
committerdfr <dfr@FreeBSD.org>2007-07-05 13:40:07 +0000
commit7eef2117621678a07bd87ae59a74ccefe0875c4e (patch)
treeb6030228c894f70ad7debb0048731729229b6edd /lib/libgssapi
parentf6b06699b2aee40f23b695938d4548f4425a020f (diff)
downloadFreeBSD-src-7eef2117621678a07bd87ae59a74ccefe0875c4e.zip
FreeBSD-src-7eef2117621678a07bd87ae59a74ccefe0875c4e.tar.gz
If the mech_type argument to gss_display_status is null, use a default
mechanism. Approved by: re (kensmith)
Diffstat (limited to 'lib/libgssapi')
-rw-r--r--lib/libgssapi/gss_display_status.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libgssapi/gss_display_status.c b/lib/libgssapi/gss_display_status.c
index 96f68609c5..f87cc9e 100644
--- a/lib/libgssapi/gss_display_status.c
+++ b/lib/libgssapi/gss_display_status.c
@@ -144,11 +144,20 @@ OM_uint32
gss_display_status(OM_uint32 *minor_status,
OM_uint32 status_value,
int status_type,
- const gss_OID mech_type,
+ const gss_OID input_mech_type,
OM_uint32 *message_content,
gss_buffer_t status_string)
{
OM_uint32 major_status;
+ gss_OID mech_type;
+
+ mech_type = input_mech_type;
+ if (mech_type == GSS_C_NO_OID) {
+ _gss_load_mech();
+ mech_type = &SLIST_FIRST(&_gss_mechs)->gm_mech_oid;
+ if (mech_type == NULL)
+ return (GSS_S_BAD_MECH);
+ }
*minor_status = 0;
switch (status_type) {
OpenPOWER on IntegriCloud