mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 18:55:10 +01:00
gssapi: use gss_buffer_desc consistently
Problem: one call to gss_import_name() includes the terminating NULL in a gss_buffer_desc.length, and one doesn't. According to the examples at: http://docs.oracle.com/cd/E19253-01/816-4863/overview-22/index.html the NULL should be included in the length. Solution: Fix one case to include the terminating NULL in the length.
This commit is contained in:
parent
4e22dd0e97
commit
2b9a352a3c
@ -173,7 +173,7 @@ int zmq::gssapi_client_t::initialize_context ()
|
|||||||
// First time through, import service_name into target_name
|
// First time through, import service_name into target_name
|
||||||
if (target_name == GSS_C_NO_NAME) {
|
if (target_name == GSS_C_NO_NAME) {
|
||||||
send_tok.value = service_name;
|
send_tok.value = service_name;
|
||||||
send_tok.length = strlen(service_name);
|
send_tok.length = strlen(service_name) + 1;
|
||||||
OM_uint32 maj = gss_import_name(&min_stat, &send_tok,
|
OM_uint32 maj = gss_import_name(&min_stat, &send_tok,
|
||||||
GSS_C_NT_HOSTBASED_SERVICE,
|
GSS_C_NT_HOSTBASED_SERVICE,
|
||||||
&target_name);
|
&target_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user