Rewrite gss_add_cred() (fix #413)
It turns out gss_add_cred() really needed a complete rewrite. It's much better to first have a gss_duplicate_cred() (which has been needed for other reasons anyways), and use that when the input_cred_handle is not GSS_C_NO_CREDENTIAL and output_cred_handle is not NULL, then mutate that duplicate credential handle (or the input_cred_handle if output_cred_handle is NULL).
This commit is contained in:

committed by
Nico Williams

parent
134b53ead1
commit
e6d1c10808
@@ -1,5 +1,7 @@
|
||||
/*-
|
||||
* Copyright (c) 2005 Doug Rabson
|
||||
* Copyright (c) 2018 Kungliga Tekniska Högskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -222,6 +224,12 @@ typedef OM_uint32 GSSAPI_CALLCONV _gss_add_cred_t (
|
||||
OM_uint32 * /* acceptor_time_rec */
|
||||
);
|
||||
|
||||
typedef OM_uint32 GSSAPI_CALLCONV _gss_duplicate_cred_t (
|
||||
OM_uint32 *, /* minor_status */
|
||||
gss_const_cred_id_t, /* input_cred_handle */
|
||||
gss_cred_id_t * /* output_cred_handle */
|
||||
);
|
||||
|
||||
typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_cred_by_mech_t (
|
||||
OM_uint32 *, /* minor_status */
|
||||
gss_const_cred_id_t, /* cred_handle */
|
||||
@@ -544,6 +552,7 @@ typedef struct gssapi_mech_interface_desc {
|
||||
_gss_set_name_attribute_t *gm_set_name_attribute;
|
||||
_gss_delete_name_attribute_t *gm_delete_name_attribute;
|
||||
_gss_export_name_composite_t *gm_export_name_composite;
|
||||
_gss_duplicate_cred_t *gm_duplicate_cred;
|
||||
struct gss_mech_compat_desc_struct *gm_compat;
|
||||
} gssapi_mech_interface_desc, *gssapi_mech_interface;
|
||||
|
||||
|
Reference in New Issue
Block a user