Commit 867dfae7 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

kerberos: Build without -DWINE_NO_LONG_TYPES.

parent 02b9dee2
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = kerberos.dll
UNIXLIB = kerberos.so
EXTRAINCL = $(KRB5_CFLAGS) $(GSSAPI_CFLAGS)
......
......@@ -181,7 +181,7 @@ static NTSTATUS NTAPI kerberos_LsaApCallPackageUntrusted(PLSA_CLIENT_REQUEST req
{
KERB_PROTOCOL_MESSAGE_TYPE msg;
TRACE("%p,%p,%p,%u,%p,%p,%p\n", req, in_buf, client_buf_base, in_buf_len, out_buf, out_buf_len, ret_status);
TRACE("%p, %p, %p, %lu, %p, %p, %p\n", req, in_buf, client_buf_base, in_buf_len, out_buf, out_buf_len, ret_status);
if (!in_buf || in_buf_len < sizeof(msg)) return STATUS_INVALID_PARAMETER;
......@@ -287,7 +287,7 @@ static NTSTATUS NTAPI kerberos_SpAcquireCredentialsHandle(
NTSTATUS status = SEC_E_INSUFFICIENT_MEMORY;
ULONG exptime;
TRACE( "(%s 0x%08x %p %p %p %p %p %p)\n", debugstr_us(principal_us), credential_use,
TRACE( "%s, %#lx, %p, %p, %p, %p, %p, %p\n", debugstr_us(principal_us), credential_use,
logon_id, auth_data, get_key_fn, get_key_arg, credential, expiry );
if (principal_us && !(principal = get_str_unixcp( principal_us ))) return SEC_E_INSUFFICIENT_MEMORY;
......@@ -319,7 +319,7 @@ done:
static NTSTATUS NTAPI kerberos_SpFreeCredentialsHandle( LSA_SEC_HANDLE credential )
{
TRACE( "(%lx)\n", credential );
TRACE( "%Ix\n", credential );
if (!credential) return SEC_E_INVALID_HANDLE;
return KRB5_CALL( free_credentials_handle, (void *)credential );
}
......@@ -336,10 +336,10 @@ static NTSTATUS NTAPI kerberos_SpInitLsaModeContext( LSA_SEC_HANDLE credential,
NTSTATUS status;
ULONG exptime;
TRACE( "(%lx %lx %s 0x%08x %u %p %p %p %p %p %p %p)\n", credential, context, debugstr_us(target_name),
TRACE( "%Ix, %Ix, %s, %#lx, %lu, %p, %p, %p, %p, %p, %p, %p\n", credential, context, debugstr_us(target_name),
context_req, target_data_rep, input, new_context, output, context_attr, expiry,
mapped_context, context_data );
if (context_req & ~supported) FIXME( "flags 0x%08x not supported\n", context_req & ~supported );
if (context_req & ~supported) FIXME( "flags %#lx not supported\n", context_req & ~supported );
if (!context && !input && !credential) return SEC_E_INVALID_HANDLE;
if (target_name && !(target = get_str_unixcp( target_name ))) return SEC_E_INSUFFICIENT_MEMORY;
......@@ -366,9 +366,9 @@ static NTSTATUS NTAPI kerberos_SpAcceptLsaModeContext( LSA_SEC_HANDLE credential
NTSTATUS status = SEC_E_INVALID_HANDLE;
ULONG exptime;
TRACE( "(%lx %lx 0x%08x %u %p %p %p %p %p %p %p)\n", credential, context, context_req, target_data_rep, input,
new_context, output, context_attr, expiry, mapped_context, context_data );
if (context_req) FIXME( "ignoring flags 0x%08x\n", context_req );
TRACE( "%Ix, %Ix, %#lx, %lu, %p, %p, %p, %p, %p, %p, %p\n", credential, context, context_req, target_data_rep,
input, new_context, output, context_attr, expiry, mapped_context, context_data );
if (context_req) FIXME( "ignoring flags %#lx\n", context_req );
if (context || input || credential)
{
......@@ -386,7 +386,7 @@ static NTSTATUS NTAPI kerberos_SpAcceptLsaModeContext( LSA_SEC_HANDLE credential
static NTSTATUS NTAPI kerberos_SpDeleteContext( LSA_SEC_HANDLE context )
{
TRACE( "(%lx)\n", context );
TRACE( "%Ix\n", context );
if (!context) return SEC_E_INVALID_HANDLE;
return KRB5_CALL( delete_context, (void *)context );
}
......@@ -411,7 +411,7 @@ static SecPkgInfoW *build_package_info( const SecPkgInfoW *info )
static NTSTATUS NTAPI kerberos_SpQueryContextAttributes( LSA_SEC_HANDLE context, ULONG attribute, void *buffer )
{
TRACE( "(%lx %u %p)\n", context, attribute, buffer );
TRACE( "%Ix, %lu, %p\n", context, attribute, buffer );
if (!context) return SEC_E_INVALID_HANDLE;
......@@ -444,7 +444,7 @@ static NTSTATUS NTAPI kerberos_SpQueryContextAttributes( LSA_SEC_HANDLE context,
}
#undef X
default:
FIXME( "unknown attribute %u\n", attribute );
FIXME( "unknown attribute %lu\n", attribute );
break;
}
......@@ -454,7 +454,7 @@ static NTSTATUS NTAPI kerberos_SpQueryContextAttributes( LSA_SEC_HANDLE context,
static NTSTATUS NTAPI kerberos_SpInitialize(ULONG_PTR package_id, SECPKG_PARAMETERS *params,
LSA_SECPKG_FUNCTION_TABLE *lsa_function_table)
{
TRACE("%lu,%p,%p\n", package_id, params, lsa_function_table);
TRACE("%Iu, %p, %p\n", package_id, params, lsa_function_table);
if (!krb5_handle)
{
......@@ -516,7 +516,7 @@ static SECPKG_FUNCTION_TABLE kerberos_table =
NTSTATUS NTAPI SpLsaModeInitialize(ULONG lsa_version, PULONG package_version,
PSECPKG_FUNCTION_TABLE *table, PULONG table_count)
{
TRACE("%#x,%p,%p,%p\n", lsa_version, package_version, table, table_count);
TRACE("%#lx, %p, %p, %p\n", lsa_version, package_version, table, table_count);
*package_version = SECPKG_INTERFACE_VERSION;
*table = &kerberos_table;
......@@ -526,16 +526,16 @@ NTSTATUS NTAPI SpLsaModeInitialize(ULONG lsa_version, PULONG package_version,
static NTSTATUS NTAPI kerberos_SpInstanceInit(ULONG version, SECPKG_DLL_FUNCTIONS *dll_function_table, void **user_functions)
{
TRACE("%#x,%p,%p\n", version, dll_function_table, user_functions);
TRACE("%#lx, %p, %p\n", version, dll_function_table, user_functions);
return STATUS_SUCCESS;
}
static NTSTATUS SEC_ENTRY kerberos_SpMakeSignature( LSA_SEC_HANDLE context, ULONG quality_of_protection,
SecBufferDesc *message, ULONG message_seq_no )
{
TRACE( "(%lx 0x%08x %p %u)\n", context, quality_of_protection, message, message_seq_no );
if (quality_of_protection) FIXME( "ignoring quality_of_protection 0x%08x\n", quality_of_protection );
if (message_seq_no) FIXME( "ignoring message_seq_no %u\n", message_seq_no );
TRACE( "%Ix, %#lx, %p, %lu\n", context, quality_of_protection, message, message_seq_no );
if (quality_of_protection) FIXME( "ignoring quality_of_protection %#lx\n", quality_of_protection );
if (message_seq_no) FIXME( "ignoring message_seq_no %lu\n", message_seq_no );
if (context)
{
......@@ -548,8 +548,8 @@ static NTSTATUS SEC_ENTRY kerberos_SpMakeSignature( LSA_SEC_HANDLE context, ULON
static NTSTATUS NTAPI kerberos_SpVerifySignature( LSA_SEC_HANDLE context, SecBufferDesc *message,
ULONG message_seq_no, ULONG *quality_of_protection )
{
TRACE( "(%lx %p %u %p)\n", context, message, message_seq_no, quality_of_protection );
if (message_seq_no) FIXME( "ignoring message_seq_no %u\n", message_seq_no );
TRACE( "%Ix, %p, %lu, %p\n", context, message, message_seq_no, quality_of_protection );
if (message_seq_no) FIXME( "ignoring message_seq_no %lu\n", message_seq_no );
if (context)
{
......@@ -562,8 +562,8 @@ static NTSTATUS NTAPI kerberos_SpVerifySignature( LSA_SEC_HANDLE context, SecBuf
static NTSTATUS NTAPI kerberos_SpSealMessage( LSA_SEC_HANDLE context, ULONG quality_of_protection,
SecBufferDesc *message, ULONG message_seq_no )
{
TRACE( "(%lx 0x%08x %p %u)\n", context, quality_of_protection, message, message_seq_no );
if (message_seq_no) FIXME( "ignoring message_seq_no %u\n", message_seq_no );
TRACE( "%Ix, %#lx, %p, %lu\n", context, quality_of_protection, message, message_seq_no );
if (message_seq_no) FIXME( "ignoring message_seq_no %lu\n", message_seq_no );
if (context)
{
......@@ -576,8 +576,8 @@ static NTSTATUS NTAPI kerberos_SpSealMessage( LSA_SEC_HANDLE context, ULONG qual
static NTSTATUS NTAPI kerberos_SpUnsealMessage( LSA_SEC_HANDLE context, SecBufferDesc *message,
ULONG message_seq_no, ULONG *quality_of_protection )
{
TRACE( "(%lx %p %u %p)\n", context, message, message_seq_no, quality_of_protection );
if (message_seq_no) FIXME( "ignoring message_seq_no %u\n", message_seq_no );
TRACE( "%Ix, %p, %lu, %p\n", context, message, message_seq_no, quality_of_protection );
if (message_seq_no) FIXME( "ignoring message_seq_no %lu\n", message_seq_no );
if (context)
{
......@@ -608,7 +608,7 @@ static SECPKG_USER_FUNCTION_TABLE kerberos_user_table =
NTSTATUS NTAPI SpUserModeInitialize(ULONG lsa_version, PULONG package_version,
PSECPKG_USER_FUNCTION_TABLE *table, PULONG table_count)
{
TRACE("%#x,%p,%p,%p\n", lsa_version, package_version, table, table_count);
TRACE("%#lx, %p, %p, %p\n", lsa_version, package_version, table, table_count);
*package_version = SECPKG_INTERFACE_VERSION;
*table = &kerberos_user_table;
......
......@@ -452,7 +452,7 @@ static NTSTATUS status_gss_to_sspi( OM_uint32 status )
case GSS_S_FAILURE: return SEC_E_INTERNAL_ERROR;
default:
FIXME( "couldn't convert status 0x%08x to NTSTATUS\n", status );
FIXME( "couldn't convert status %#x to NTSTATUS\n", status );
return SEC_E_INTERNAL_ERROR;
}
}
......@@ -468,10 +468,10 @@ static void trace_gss_status_ex( OM_uint32 code, int type )
ret = pgss_display_status( &minor_status, code, type, GSS_C_NULL_OID, &msg_ctx, &buf );
if (GSS_ERROR( ret ))
{
TRACE( "gss_display_status(0x%08x,%d) returned %08x minor status %08x\n", code, type, ret, minor_status );
TRACE( "gss_display_status(%#x, %d) returned %#x minor status %#x\n", code, type, ret, minor_status );
return;
}
TRACE( "GSS-API error: 0x%08x: %s\n", code, debugstr_an(buf.value, buf.length) );
TRACE( "GSS-API error: %#x: %s\n", code, debugstr_an(buf.value, buf.length) );
pgss_release_buffer( &minor_status, &buf );
if (!msg_ctx) return;
}
......@@ -544,13 +544,14 @@ static NTSTATUS accept_context( void *args )
ret = pgss_accept_sec_context( &minor_status, &ctx_handle, cred_handle, &input_token, GSS_C_NO_CHANNEL_BINDINGS,
NULL, NULL, &output_token, &ret_flags, &expiry_time, NULL );
TRACE( "gss_accept_sec_context returned %08x minor status %08x ret_flags %08x\n", ret, minor_status, ret_flags );
TRACE( "gss_accept_sec_context returned %#x minor status %#x ret_flags %#x\n", ret, minor_status, ret_flags );
if (GSS_ERROR( ret )) trace_gss_status( ret, minor_status );
if (ret == GSS_S_COMPLETE || ret == GSS_S_CONTINUE_NEEDED)
{
if (output_token.length > params->output->pBuffers[idx].cbBuffer) /* FIXME: check if larger buffer exists */
{
TRACE( "buffer too small %lu > %u\n", (SIZE_T)output_token.length, params->output->pBuffers[idx].cbBuffer );
TRACE( "buffer too small %lu > %u\n",
(SIZE_T)output_token.length, (unsigned int)params->output->pBuffers[idx].cbBuffer );
pgss_release_buffer( &minor_status, &output_token );
pgss_delete_sec_context( &minor_status, &ctx_handle, GSS_C_NO_BUFFER );
return SEC_E_BUFFER_TOO_SMALL;
......@@ -605,7 +606,7 @@ static NTSTATUS import_name( const char *src, gss_name_t *dst )
buf.length = strlen( src );
buf.value = (void *)src;
ret = pgss_import_name( &minor_status, &buf, GSS_C_NO_OID, dst );
TRACE( "gss_import_name returned %08x minor status %08x\n", ret, minor_status );
TRACE( "gss_import_name returned %#x minor status %#x\n", ret, minor_status );
if (GSS_ERROR( ret )) trace_gss_status( ret, minor_status );
return status_gss_to_sspi( ret );
}
......@@ -639,7 +640,7 @@ static NTSTATUS acquire_credentials_handle( void *args )
ret = pgss_acquire_cred( &minor_status, name, GSS_C_INDEFINITE, GSS_C_NULL_OID_SET, cred_usage, &cred_handle,
NULL, &expiry_time );
TRACE( "gss_acquire_cred returned %08x minor status %08x\n", ret, minor_status );
TRACE( "gss_acquire_cred returned %#x minor status %#x\n", ret, minor_status );
if (GSS_ERROR( ret )) trace_gss_status( ret, minor_status );
if (ret == GSS_S_COMPLETE)
{
......@@ -657,7 +658,7 @@ static NTSTATUS delete_context( void *args )
gss_ctx_id_t ctx_handle = ctxhandle_sspi_to_gss( (LSA_SEC_HANDLE)args );
ret = pgss_delete_sec_context( &minor_status, &ctx_handle, GSS_C_NO_BUFFER );
TRACE( "gss_delete_sec_context returned %08x minor status %08x\n", ret, minor_status );
TRACE( "gss_delete_sec_context returned %#x minor status %#x\n", ret, minor_status );
if (GSS_ERROR( ret )) trace_gss_status( ret, minor_status );
return status_gss_to_sspi( ret );
}
......@@ -668,7 +669,7 @@ static NTSTATUS free_credentials_handle( void *args )
gss_cred_id_t cred = credhandle_sspi_to_gss( (LSA_SEC_HANDLE)args );
ret = pgss_release_cred( &minor_status, &cred );
TRACE( "gss_release_cred returned %08x minor status %08x\n", ret, minor_status );
TRACE( "gss_release_cred returned %#x minor status %#x\n", ret, minor_status );
if (GSS_ERROR( ret )) trace_gss_status( ret, minor_status );
return status_gss_to_sspi( ret );
}
......@@ -730,13 +731,14 @@ static NTSTATUS initialize_context( void *args )
ret = pgss_init_sec_context( &minor_status, cred_handle, &ctx_handle, target, GSS_C_NO_OID, req_flags, 0,
GSS_C_NO_CHANNEL_BINDINGS, &input_token, NULL, &output_token, &ret_flags,
&expiry_time );
TRACE( "gss_init_sec_context returned %08x minor status %08x ret_flags %08x\n", ret, minor_status, ret_flags );
TRACE( "gss_init_sec_context returned %#x minor status %#x ret_flags %#x\n", ret, minor_status, ret_flags );
if (GSS_ERROR( ret )) trace_gss_status( ret, minor_status );
if (ret == GSS_S_COMPLETE || ret == GSS_S_CONTINUE_NEEDED)
{
if (output_token.length > params->output->pBuffers[idx].cbBuffer) /* FIXME: check if larger buffer exists */
{
TRACE( "buffer too small %lu > %u\n", (SIZE_T)output_token.length, params->output->pBuffers[idx].cbBuffer );
TRACE( "buffer too small %lu > %u\n",
(SIZE_T)output_token.length, (unsigned int)params->output->pBuffers[idx].cbBuffer );
pgss_release_buffer( &minor_status, &output_token );
pgss_delete_sec_context( &minor_status, &ctx_handle, GSS_C_NO_BUFFER );
return SEC_E_INCOMPLETE_MESSAGE;
......@@ -773,7 +775,7 @@ static NTSTATUS make_signature( void *args )
token_buffer.value = NULL;
ret = pgss_get_mic( &minor_status, ctx_handle, GSS_C_QOP_DEFAULT, &data_buffer, &token_buffer );
TRACE( "gss_get_mic returned %08x minor status %08x\n", ret, minor_status );
TRACE( "gss_get_mic returned %#x minor status %#x\n", ret, minor_status );
if (GSS_ERROR( ret )) trace_gss_status( ret, minor_status );
if (ret == GSS_S_COMPLETE)
{
......@@ -837,7 +839,7 @@ static NTSTATUS seal_message_vector( gss_ctx_id_t ctx, SecBufferDesc *msg, unsig
conf_flag = 0; /* only integrity */
else
{
FIXME( "QOP %08x not supported\n", qop );
FIXME( "QOP %#x not supported\n", qop );
return SEC_E_UNSUPPORTED_FUNCTION;
}
......@@ -862,7 +864,7 @@ static NTSTATUS seal_message_vector( gss_ctx_id_t ctx, SecBufferDesc *msg, unsig
iov[3].buffer.value = NULL;
ret = pgss_wrap_iov( &minor_status, ctx, conf_flag, GSS_C_QOP_DEFAULT, &conf_state, iov, 4 );
TRACE( "gss_wrap_iov returned %08x minor status %08x\n", ret, minor_status );
TRACE( "gss_wrap_iov returned %#x minor status %#x\n", ret, minor_status );
if (GSS_ERROR( ret )) trace_gss_status( ret, minor_status );
if (ret == GSS_S_COMPLETE)
{
......@@ -886,7 +888,7 @@ static NTSTATUS seal_message_no_vector( gss_ctx_id_t ctx, SecBufferDesc *msg, un
conf_flag = 0; /* only integrity */
else
{
FIXME( "QOP %08x not supported\n", qop );
FIXME( "QOP %#x not supported\n", qop );
return SEC_E_UNSUPPORTED_FUNCTION;
}
......@@ -898,7 +900,7 @@ static NTSTATUS seal_message_no_vector( gss_ctx_id_t ctx, SecBufferDesc *msg, un
input.value = msg->pBuffers[data_idx].pvBuffer;
ret = pgss_wrap( &minor_status, ctx, conf_flag, GSS_C_QOP_DEFAULT, &input, &conf_state, &output );
TRACE( "gss_wrap returned %08x minor status %08x\n", ret, minor_status );
TRACE( "gss_wrap returned %#x minor status %#x\n", ret, minor_status );
if (GSS_ERROR( ret )) trace_gss_status( ret, minor_status );
if (ret == GSS_S_COMPLETE)
{
......@@ -953,7 +955,7 @@ static NTSTATUS unseal_message_vector( gss_ctx_id_t ctx, SecBufferDesc *msg, ULO
iov[3].buffer.value = msg->pBuffers[token_idx].pvBuffer;
ret = pgss_unwrap_iov( &minor_status, ctx, &conf_state, NULL, iov, 4 );
TRACE( "gss_unwrap_iov returned %08x minor status %08x\n", ret, minor_status );
TRACE( "gss_unwrap_iov returned %#x minor status %#x\n", ret, minor_status );
if (GSS_ERROR( ret )) trace_gss_status( ret, minor_status );
if (ret == GSS_S_COMPLETE && qop)
{
......@@ -982,7 +984,7 @@ static NTSTATUS unseal_message_no_vector( gss_ctx_id_t ctx, SecBufferDesc *msg,
ret = pgss_unwrap( &minor_status, ctx, &input, &output, &conf_state, NULL );
free( input.value );
TRACE( "gss_unwrap returned %08x minor status %08x\n", ret, minor_status );
TRACE( "gss_unwrap returned %#x minor status %#x\n", ret, minor_status );
if (GSS_ERROR( ret )) trace_gss_status( ret, minor_status );
if (ret == GSS_S_COMPLETE)
{
......@@ -1021,7 +1023,7 @@ static NTSTATUS verify_signature( void *args )
token_buffer.value = msg->pBuffers[token_idx].pvBuffer;
ret = pgss_verify_mic( &minor_status, ctx_handle, &data_buffer, &token_buffer, NULL );
TRACE( "gss_verify_mic returned %08x minor status %08x\n", ret, minor_status );
TRACE( "gss_verify_mic returned %#x minor status %#x\n", ret, minor_status );
if (GSS_ERROR( ret )) trace_gss_status( ret, minor_status );
if (ret == GSS_S_COMPLETE && params->qop) *params->qop = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment