libwinpr-sspi: fix build on Linux

This commit is contained in:
Marc-André Moreau 2014-06-07 16:46:32 -04:00
parent 03cf7933d9
commit a37c6bb653
5 changed files with 16 additions and 15 deletions

View File

@ -36,7 +36,7 @@
#endif
#ifdef WINPR_SSPI
#ifndef _WIN32
#ifndef SEC_ENTRY
#define SEC_ENTRY
@ -252,7 +252,7 @@ typedef SecPkgInfoW* PSecPkgInfoW;
#define SECPKG_ATTR_NEGO_STATUS 32
#define SECPKG_ATTR_CONTEXT_DELETED 33
#ifdef WINPR_SSPI
#ifndef _WIN32
struct _SecPkgContext_AccessToken
{
@ -579,7 +579,7 @@ typedef SecPkgCredentials_NamesW* PSecPkgCredentials_NamesW;
#define SEC_WINNT_AUTH_IDENTITY_ANSI 0x1
#define SEC_WINNT_AUTH_IDENTITY_UNICODE 0x2
#ifdef WINPR_SSPI
#ifndef _WIN32
typedef struct _SEC_WINNT_AUTH_IDENTITY_W
{
@ -665,7 +665,7 @@ typedef CtxtHandle* PCtxtHandle;
#define SECBUFFER_READONLY_WITH_CHECKSUM 0x10000000
#define SECBUFFER_RESERVED 0x60000000
#ifdef WINPR_SSPI
#ifndef _WIN32
struct _SecBuffer
{

View File

@ -25,6 +25,7 @@
#include <wctype.h>
#include <winpr/crt.h>
#include <winpr/error.h>
#include <winpr/print.h>
#ifndef _WIN32
@ -308,7 +309,7 @@ int ConvertToUnicode(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr,
if (!(*lpWideCharStr))
{
SetLastError(ERROR_INSUFFICIENT_BUFFER);
//SetLastError(ERROR_INSUFFICIENT_BUFFER);
return 0;
}
}
@ -354,7 +355,7 @@ int ConvertFromUnicode(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int
if (!(*lpMultiByteStr))
{
SetLastError(ERROR_INSUFFICIENT_BUFFER);
//SetLastError(ERROR_INSUFFICIENT_BUFFER);
return 0;
}
}

View File

@ -81,7 +81,7 @@ endif()
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
MODULE winpr
MODULES winpr-crt winpr-sysinfo winpr-registry winpr-crypto winpr-utils)
MODULES winpr-crt winpr-sysinfo winpr-registry winpr-crypto winpr-library winpr-utils)
if(MONOLITHIC_BUILD)
set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)

View File

@ -21,11 +21,11 @@
#include "config.h"
#endif
#define SEC_ENTRY __stdcall
#ifdef _WIN32
#define SEC_ENTRY __stdcall
#define SSPI_EXPORT __declspec(dllexport)
#else
#define SEC_ENTRY
#define SSPI_EXPORT
#endif

View File

@ -812,7 +812,7 @@ SECURITY_STATUS SEC_ENTRY winpr_AcquireCredentialsHandleA(SEC_CHAR* pszPrincipal
SECURITY_STATUS SEC_ENTRY winpr_ExportSecurityContext(PCtxtHandle phContext, ULONG fFlags, PSecBuffer pPackedContext, HANDLE* pToken)
{
return SEC_E_NOT_SUPPORTED;
return SEC_E_UNSUPPORTED_FUNCTION;
}
SECURITY_STATUS SEC_ENTRY winpr_FreeCredentialsHandle(PCredHandle phCredential)
@ -841,7 +841,7 @@ SECURITY_STATUS SEC_ENTRY winpr_FreeCredentialsHandle(PCredHandle phCredential)
SECURITY_STATUS SEC_ENTRY winpr_ImportSecurityContextW(SEC_WCHAR* pszPackage, PSecBuffer pPackedContext, HANDLE pToken, PCtxtHandle phContext)
{
return SEC_E_NOT_SUPPORTED;
return SEC_E_UNSUPPORTED_FUNCTION;
}
SECURITY_STATUS SEC_ENTRY winpr_ImportSecurityContextA(SEC_CHAR* pszPackage, PSecBuffer pPackedContext, HANDLE pToken, PCtxtHandle phContext)
@ -1159,22 +1159,22 @@ SECURITY_STATUS SEC_ENTRY winpr_QueryContextAttributesA(PCtxtHandle phContext, U
SECURITY_STATUS SEC_ENTRY winpr_QuerySecurityContextToken(PCtxtHandle phContext, HANDLE* phToken)
{
return SEC_E_NOT_SUPPORTED;
return SEC_E_UNSUPPORTED_FUNCTION;
}
SECURITY_STATUS SEC_ENTRY winpr_SetContextAttributesW(PCtxtHandle phContext, ULONG ulAttribute, void* pBuffer, ULONG cbBuffer)
{
return SEC_E_NOT_SUPPORTED;
return SEC_E_UNSUPPORTED_FUNCTION;
}
SECURITY_STATUS SEC_ENTRY winpr_SetContextAttributesA(PCtxtHandle phContext, ULONG ulAttribute, void* pBuffer, ULONG cbBuffer)
{
return SEC_E_NOT_SUPPORTED;
return SEC_E_UNSUPPORTED_FUNCTION;
}
SECURITY_STATUS SEC_ENTRY winpr_RevertSecurityContext(PCtxtHandle phContext)
{
return SEC_E_NOT_SUPPORTED;
return SEC_E_UNSUPPORTED_FUNCTION;
}
/* Message Support */