Signed-off-by: Hans Leidekker hans@codeweavers.com --- dlls/secur32/Makefile.in | 2 ++ dlls/secur32/negotiate.c | 3 +-- dlls/secur32/schannel.c | 22 +++++++++++----------- dlls/secur32/secur32.c | 28 ++++++++++------------------ dlls/secur32/thunks.c | 5 +++-- dlls/secur32/wrapper.c | 3 ++- 6 files changed, 29 insertions(+), 34 deletions(-)
diff --git a/dlls/secur32/Makefile.in b/dlls/secur32/Makefile.in index a5aa3b52691..458f62bb99f 100644 --- a/dlls/secur32/Makefile.in +++ b/dlls/secur32/Makefile.in @@ -5,6 +5,8 @@ DELAYIMPORTS = crypt32 EXTRAINCL = $(GNUTLS_CFLAGS) EXTRALIBS = $(SECURITY_LIBS) $(PTHREAD_LIBS)
+EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ lsa.c \ negotiate.c \ diff --git a/dlls/secur32/negotiate.c b/dlls/secur32/negotiate.c index aeddbccd4f4..6d45d0c5d54 100644 --- a/dlls/secur32/negotiate.c +++ b/dlls/secur32/negotiate.c @@ -23,10 +23,9 @@ #include "sspi.h" #include "rpc.h" #include "wincred.h" -#include "secur32_priv.h"
#include "wine/debug.h" -#include "wine/unicode.h" +#include "secur32_priv.h"
WINE_DEFAULT_DEBUG_CHANNEL(secur32);
diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index 5f6b96903c4..adbc6a810ed 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -25,15 +25,15 @@ #define NONAMELESSUNION #include "windef.h" #include "winbase.h" +#include "winternl.h" #include "winreg.h" #include "winnls.h" #include "lmcons.h" #include "sspi.h" #include "schannel.h" -#include "secur32_priv.h"
-#include "wine/unicode.h" #include "wine/debug.h" +#include "secur32_priv.h"
WINE_DEFAULT_DEBUG_CHANNEL(secur32);
@@ -199,8 +199,8 @@ static void read_config(void) DWORD type, size, value;
for(i = 0; i < ARRAY_SIZE(protocol_config_keys); i++) { - strcpyW(subkey_name, protocol_config_keys[i].key_name); - strcatW(subkey_name, clientW); + wcscpy(subkey_name, protocol_config_keys[i].key_name); + wcscat(subkey_name, clientW); res = RegOpenKeyExW(protocols_key, subkey_name, 0, KEY_READ, &key); if(res != ERROR_SUCCESS) { if(protocol_config_keys[i].enabled) @@ -412,8 +412,8 @@ static WCHAR *get_key_container_path(const CERT_CONTEXT *ctx) RtlFreeHeap(GetProcessHeap(), 0, str); return NULL; } - strcpyW(ret, rsabaseW); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret + strlenW(ret), len); + wcscpy(ret, rsabaseW); + MultiByteToWideChar(CP_ACP, 0, str, -1, ret + wcslen(ret), len); RtlFreeHeap(GetProcessHeap(), 0, str); } else if (CertGetCertificateContextProperty(ctx, CERT_KEY_PROV_INFO_PROP_ID, NULL, &prov_size)) @@ -425,21 +425,21 @@ static WCHAR *get_key_container_path(const CERT_CONTEXT *ctx) return NULL; } if (!(ret = RtlAllocateHeap(GetProcessHeap(), 0, - sizeof(rsabaseW) + strlenW(prov->pwszContainerName) * sizeof(WCHAR)))) + sizeof(rsabaseW) + wcslen(prov->pwszContainerName) * sizeof(WCHAR)))) { RtlFreeHeap(GetProcessHeap(), 0, prov); return NULL; } - strcpyW(ret, rsabaseW); - strcatW(ret, prov->pwszContainerName); + wcscpy(ret, rsabaseW); + wcscat(ret, prov->pwszContainerName); RtlFreeHeap(GetProcessHeap(), 0, prov); }
if (!ret && GetUserNameW(username, &len) && (ret = RtlAllocateHeap(GetProcessHeap(), 0, sizeof(rsabaseW) + len * sizeof(WCHAR)))) { - strcpyW(ret, rsabaseW); - strcatW(ret, username); + wcscpy(ret, rsabaseW); + wcscat(ret, username); }
return ret; diff --git a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c index 04cb52dbec9..374030d0064 100644 --- a/dlls/secur32/secur32.c +++ b/dlls/secur32/secur32.c @@ -16,6 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + #include <assert.h> #include <stdarg.h>
@@ -28,7 +29,6 @@ #include "winternl.h" #include "shlwapi.h" #include "sspi.h" -#include "secur32_priv.h" #include "secext.h" #include "ntsecapi.h" #include "thunks.h" @@ -36,7 +36,7 @@
#include "wine/list.h" #include "wine/debug.h" -#include "wine/unicode.h" +#include "secur32_priv.h"
WINE_DEFAULT_DEBUG_CHANNEL(secur32);
@@ -174,18 +174,10 @@ PSecurityFunctionTableW WINAPI InitSecurityInterfaceW(void) return &securityFunctionTableW; }
-static PWSTR SECUR32_strdupW(PCWSTR str) +static WCHAR *SECUR32_strdupW(const WCHAR *str) { - PWSTR ret; - - if (str) - { - ret = heap_alloc((lstrlenW(str) + 1) * sizeof(WCHAR)); - if (ret) - lstrcpyW(ret, str); - } - else - ret = NULL; + WCHAR *ret = NULL; + if (str && (ret = heap_alloc((wcslen(str) + 1) * sizeof(WCHAR)))) wcscpy(ret, str); return ret; }
@@ -595,7 +587,7 @@ static void SECUR32_initializeProviders(void) ; if (*comma == ',') *comma = '\0'; - for (; *ptr && isspaceW(*ptr) && ptr < securityPkgNames + size; + for (; *ptr && iswspace(*ptr) && ptr < securityPkgNames + size; ptr++) ; if (*ptr) @@ -1046,16 +1038,16 @@ BOOLEAN WINAPI GetComputerObjectNameW( break; }
- len = strlenW(cnW) + size + 1 + strlenW(ComputersW) + 1 + strlenW(dcW); + len = wcslen(cnW) + size + 1 + wcslen(ComputersW) + 1 + wcslen(dcW); if (domainInfo->DnsDomainName.Buffer) { - suffix = strrchrW(domainInfo->DnsDomainName.Buffer, '.'); + suffix = wcsrchr(domainInfo->DnsDomainName.Buffer, '.'); if (suffix) { *suffix++ = 0; - len += 1 + strlenW(dcW) + strlenW(suffix); + len += 1 + wcslen(dcW) + wcslen(suffix); } - len += strlenW(domainInfo->DnsDomainName.Buffer); + len += wcslen(domainInfo->DnsDomainName.Buffer); } else suffix = NULL; diff --git a/dlls/secur32/thunks.c b/dlls/secur32/thunks.c index 09b20d54abe..7a59c4ee3ca 100644 --- a/dlls/secur32/thunks.c +++ b/dlls/secur32/thunks.c @@ -17,16 +17,17 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + #include <stdarg.h> #include "windef.h" #include "winbase.h" #include "winnls.h" #include "winternl.h" #include "sspi.h" -#include "secur32_priv.h" -#include "thunks.h"
#include "wine/debug.h" +#include "secur32_priv.h" +#include "thunks.h"
WINE_DEFAULT_DEBUG_CHANNEL(secur32);
diff --git a/dlls/secur32/wrapper.c b/dlls/secur32/wrapper.c index 67c5b5a7215..7e36f293f62 100644 --- a/dlls/secur32/wrapper.c +++ b/dlls/secur32/wrapper.c @@ -16,14 +16,15 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + #include <stdarg.h> #include "windef.h" #include "winbase.h" #include "winnls.h" #include "sspi.h" -#include "secur32_priv.h"
#include "wine/debug.h" +#include "secur32_priv.h"
WINE_DEFAULT_DEBUG_CHANNEL(secur32);