RFC 2743 says (regarding gss_acquire_cred),
``A caller may provide the value NULL (GSS_C_NO_NAME) for desired_name, which will be interpreted as a request for a credential handle that will invoke default behavior when passed to GSS_Init_sec_context(), if cred_usage is GSS_C_INITIATE or GSS_C_BOTH, or GSS_Accept_sec_context(), if cred_usage is GSS_C_ACCEPT or GSS_C_BOTH.'' git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11155 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -164,12 +164,6 @@ static OM_uint32 acquire_acceptor_cred
|
||||
|
||||
kret = 0;
|
||||
ret = GSS_S_FAILURE;
|
||||
if (handle->principal == NULL) {
|
||||
kret = krb5_sname_to_principal(gssapi_krb5_context, NULL, NULL,
|
||||
KRB5_NT_SRV_HST, &handle->principal);
|
||||
if (kret)
|
||||
goto end;
|
||||
}
|
||||
kret = get_keytab(&handle->keytab);
|
||||
if (kret)
|
||||
goto end;
|
||||
@@ -210,7 +204,7 @@ OM_uint32 gss_acquire_cred
|
||||
|
||||
memset(handle, 0, sizeof (*handle));
|
||||
|
||||
if (desired_name != NULL) {
|
||||
if (desired_name != GSS_C_NO_NAME) {
|
||||
ret = gss_duplicate_name(minor_status, desired_name,
|
||||
&handle->principal);
|
||||
if (ret != GSS_S_COMPLETE) {
|
||||
|
Reference in New Issue
Block a user