Rewrite gss_add_cred() (fix #413)
commite6d1c10808bae4853b005bd981878c42c3432cfe
authorNicolas Williams <nico@twosigma.com>
Wed, 26 Dec 2018 23:24:08 +0000 (26 17:24 -0600)
committerNico Williams <nico@cryptonector.com>
Sat, 29 Dec 2018 01:26:25 +0000 (28 19:26 -0600)
treed1359127e5cf42478546c6a2a67bd471c2d7bc42
parent134b53ead18ede36d392be5651e6c9b17326350f
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).
17 files changed:
lib/gssapi/Makefile.am
lib/gssapi/NTMakefile
lib/gssapi/gssapi/gssapi.h
lib/gssapi/gssapi_mech.h
lib/gssapi/krb5/duplicate_cred.c [new file with mode: 0644]
lib/gssapi/krb5/external.c
lib/gssapi/krb5/test_acquire_cred.c
lib/gssapi/krb5/test_cred.c
lib/gssapi/mech/gss_add_cred.c
lib/gssapi/mech/gss_duplicate_cred.c [new file with mode: 0644]
lib/gssapi/netlogon/duplicate_cred.c [copied from lib/gssapi/netlogon/external.c with 56% similarity]
lib/gssapi/netlogon/external.c
lib/gssapi/netlogon/netlogon.h
lib/gssapi/ntlm/duplicate_cred.c [copied from lib/gssapi/netlogon/external.c with 50% similarity]
lib/gssapi/ntlm/external.c
lib/gssapi/ntlm/ntlm.h
lib/gssapi/spnego/external.c