diff options
author | Luke Howard <lukeh@padl.com> | 2011-04-02 08:58:54 +0000 |
---|---|---|
committer | Luke Howard <lukeh@padl.com> | 2011-04-02 08:58:54 +0000 |
commit | b31a2819d27db2346da16a4122532d7162d7e784 (patch) | |
tree | 9083b550b0838d45175c853ca12680993db72d55 | |
parent | 445b596a949e1f61ffb366cbb7c9a6e02954f9bc (diff) | |
download | krb5-b31a2819d27db2346da16a4122532d7162d7e784.zip krb5-b31a2819d27db2346da16a4122532d7162d7e784.tar.gz krb5-b31a2819d27db2346da16a4122532d7162d7e784.tar.bz2 |
allow empty names when importing GSS_C_NT_ANONYMOUS
git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/saml2@24797 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/gssapi/mechglue/g_imp_name.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib/gssapi/mechglue/g_imp_name.c b/src/lib/gssapi/mechglue/g_imp_name.c index e5179e7..7afa188 100644 --- a/src/lib/gssapi/mechglue/g_imp_name.c +++ b/src/lib/gssapi/mechglue/g_imp_name.c @@ -65,15 +65,19 @@ val_imp_name_args( if (input_name_buffer == GSS_C_NO_BUFFER) return (GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME); - if (input_name_buffer->length == 0) - return GSS_S_BAD_NAME; + if (input_name_type == GSS_C_NO_OID || + !g_OID_equal(input_name_type, GSS_C_NT_ANONYMOUS)) { + if (input_name_buffer->length == 0) + return (GSS_S_BAD_NAME); - if (input_name_buffer->value == NULL) - return (GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME); + if (input_name_buffer->value == NULL) + return (GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME); + } return (GSS_S_COMPLETE); } +static gss_buffer_desc emptyNameBuffer; OM_uint32 KRB5_CALLCONV gss_import_name(minor_status, @@ -90,6 +94,9 @@ gss_name_t * output_name; gss_union_name_t union_name; OM_uint32 tmp, major_status = GSS_S_FAILURE; + if (input_name_buffer == GSS_C_NO_BUFFER) + input_name_buffer = &emptyNameBuffer; + major_status = val_imp_name_args(minor_status, input_name_buffer, input_name_type, output_name); |