Duplicating attributed names
lukeh at padl.com
Thu Mar 17 10:18:49 EDT 2011
Another bug I ran into is that gss_duplicate_name() doesn't copy naming attributes, because it just re-imports the string representation of the mechanism name. This means that you can't use gss_get_name_attribute() on a duplicate name: you need to use it directly on the name returned by gss_accept_sec_context() (or another name that you set attributes on explicitly).
I had run into this bug before and I had intended to resolve it by importing an exported composite name. Unfortunately this may not only be inefficient but also is pending assignment of an OID for the composite name type.
A simpler solution, which I committed in r24721 of users/lhoward/moonshot-mechglue-fixes, is to simply allow mechanisms to export a gss_duplicate_name() SPI and use that if it exists. If absent, then the previous import behaviour is used to duplicate a name.
This involved a relatively small change to gssint_import_internal_name().
More information about the krbdev