Commit 697bda8a authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

kerberos: Consistently use NTSTATUS return values.

parent c1a9749a
...@@ -691,7 +691,7 @@ static inline void ctxthandle_gss_to_sspi( gss_ctx_id_t handle, LSA_SEC_HANDLE * ...@@ -691,7 +691,7 @@ static inline void ctxthandle_gss_to_sspi( gss_ctx_id_t handle, LSA_SEC_HANDLE *
*ctxt = (LSA_SEC_HANDLE)handle; *ctxt = (LSA_SEC_HANDLE)handle;
} }
static SECURITY_STATUS status_gss_to_sspi( OM_uint32 status ) static NTSTATUS status_gss_to_sspi( OM_uint32 status )
{ {
switch (status) switch (status)
{ {
...@@ -712,7 +712,7 @@ static SECURITY_STATUS status_gss_to_sspi( OM_uint32 status ) ...@@ -712,7 +712,7 @@ static SECURITY_STATUS status_gss_to_sspi( OM_uint32 status )
case GSS_S_GAP_TOKEN: return SEC_E_OUT_OF_SEQUENCE; case GSS_S_GAP_TOKEN: return SEC_E_OUT_OF_SEQUENCE;
default: default:
FIXME( "couldn't convert status 0x%08x to SECURITY_STATUS\n", status ); FIXME( "couldn't convert status 0x%08x to NTSTATUS\n", status );
return SEC_E_INTERNAL_ERROR; return SEC_E_INTERNAL_ERROR;
} }
} }
...@@ -761,7 +761,7 @@ static void expirytime_gss_to_sspi( OM_uint32 expirytime, TimeStamp *timestamp ) ...@@ -761,7 +761,7 @@ static void expirytime_gss_to_sspi( OM_uint32 expirytime, TimeStamp *timestamp )
timestamp->HighPart = tmp.QuadPart >> 32; timestamp->HighPart = tmp.QuadPart >> 32;
} }
static SECURITY_STATUS name_sspi_to_gss( const UNICODE_STRING *name_str, gss_name_t *name ) static NTSTATUS name_sspi_to_gss( const UNICODE_STRING *name_str, gss_name_t *name )
{ {
OM_uint32 ret, minor_status; OM_uint32 ret, minor_status;
gss_OID type = GSS_C_NO_OID; /* FIXME: detect the appropriate value for this ourselves? */ gss_OID type = GSS_C_NO_OID; /* FIXME: detect the appropriate value for this ourselves? */
...@@ -925,8 +925,9 @@ static NTSTATUS acquire_credentials_handle( UNICODE_STRING *principal_us, gss_cr ...@@ -925,8 +925,9 @@ static NTSTATUS acquire_credentials_handle( UNICODE_STRING *principal_us, gss_cr
OM_uint32 ret, minor_status, expiry_time; OM_uint32 ret, minor_status, expiry_time;
gss_name_t principal = GSS_C_NO_NAME; gss_name_t principal = GSS_C_NO_NAME;
gss_cred_id_t cred_handle; gss_cred_id_t cred_handle;
NTSTATUS status;
if (principal_us && ((ret = name_sspi_to_gss( principal_us, &principal )) != SEC_E_OK)) return ret; if (principal_us && ((status = name_sspi_to_gss( principal_us, &principal )) != SEC_E_OK)) return status;
ret = pgss_acquire_cred( &minor_status, principal, GSS_C_INDEFINITE, GSS_C_NULL_OID_SET, cred_usage, ret = pgss_acquire_cred( &minor_status, principal, GSS_C_INDEFINITE, GSS_C_NULL_OID_SET, cred_usage,
&cred_handle, NULL, &expiry_time ); &cred_handle, NULL, &expiry_time );
...@@ -1018,6 +1019,7 @@ static NTSTATUS NTAPI kerberos_SpInitLsaModeContext( LSA_SEC_HANDLE credential, ...@@ -1018,6 +1019,7 @@ static NTSTATUS NTAPI kerberos_SpInitLsaModeContext( LSA_SEC_HANDLE credential,
gss_ctx_id_t ctxt_handle; gss_ctx_id_t ctxt_handle;
gss_buffer_desc input_token, output_token; gss_buffer_desc input_token, output_token;
gss_name_t target = GSS_C_NO_NAME; gss_name_t target = GSS_C_NO_NAME;
NTSTATUS status;
int idx; int idx;
TRACE( "(%lx %lx %s 0x%08x %u %p %p %p %p %p %p %p)\n", credential, context, debugstr_us(target_name), TRACE( "(%lx %lx %s 0x%08x %u %p %p %p %p %p %p %p)\n", credential, context, debugstr_us(target_name),
...@@ -1041,7 +1043,7 @@ static NTSTATUS NTAPI kerberos_SpInitLsaModeContext( LSA_SEC_HANDLE credential, ...@@ -1041,7 +1043,7 @@ static NTSTATUS NTAPI kerberos_SpInitLsaModeContext( LSA_SEC_HANDLE credential,
output_token.length = 0; output_token.length = 0;
output_token.value = NULL; output_token.value = NULL;
if (target_name && ((ret = name_sspi_to_gss( target_name, &target )) != SEC_E_OK)) return ret; if (target_name && ((status = name_sspi_to_gss( target_name, &target )) != SEC_E_OK)) return status;
ret = pgss_init_sec_context( &minor_status, cred_handle, &ctxt_handle, target, GSS_C_NO_OID, req_flags, 0, ret = pgss_init_sec_context( &minor_status, cred_handle, &ctxt_handle, target, GSS_C_NO_OID, req_flags, 0,
GSS_C_NO_CHANNEL_BINDINGS, &input_token, NULL, &output_token, &ret_flags, GSS_C_NO_CHANNEL_BINDINGS, &input_token, NULL, &output_token, &ret_flags,
...@@ -1369,7 +1371,7 @@ static NTSTATUS SEC_ENTRY kerberos_SpMakeSignature( LSA_SEC_HANDLE context, ULON ...@@ -1369,7 +1371,7 @@ static NTSTATUS SEC_ENTRY kerberos_SpMakeSignature( LSA_SEC_HANDLE context, ULON
#endif #endif
} }
static SECURITY_STATUS SEC_ENTRY kerberos_SpVerifySignature( LSA_SEC_HANDLE context, SecBufferDesc *message, static NTSTATUS NTAPI kerberos_SpVerifySignature( LSA_SEC_HANDLE context, SecBufferDesc *message,
ULONG message_seq_no, ULONG *quality_of_protection ) ULONG message_seq_no, ULONG *quality_of_protection )
{ {
#ifdef SONAME_LIBGSSAPI_KRB5 #ifdef SONAME_LIBGSSAPI_KRB5
......
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