Subversion Repositories Aucun

Compare Revisions

Ignore whitespace Rev 191 → Rev 192

/branches/selfserve/shellie/RESHelper.cpp
7,7 → 7,7
#include <atlstr.h>
 
TCHAR CRESHelper::mURL[MAX_PATH+24] = _T("res://");
int CRESHelper::len = 0;
size_t CRESHelper::len = 0;
 
void CRESHelper::Initialize(HINSTANCE dll)
{
/branches/selfserve/common/Settings.c
95,7 → 95,7
 
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, key, 0, KEY_WRITE, &reg) == ERROR_SUCCESS)
{
if (RegSetValueEx(reg, name, 0, REG_SZ, (LPBYTE)text, wcslen(text)+1) == ERROR_SUCCESS)
if (RegSetValueEx(reg, name, 0, REG_SZ, (LPBYTE)text, (DWORD)wcslen(text)+1) == ERROR_SUCCESS)
{
result = S_OK;
}
/branches/selfserve/GINA/loggedout_dlg.cpp
215,11 → 215,10
 
SetWindowPos(hwndDlg, 0, 0, 0, rect.right-rect.left, rect.bottom-rect.top-decrease-margin, SWP_NOMOVE|SWP_FRAMECHANGED);
 
//Save the username that user tried to logon
GetDlgItemText(hwndDlg, 1502, gUsername, gUsername_len);
//Save the username that user tried to logon
GetDlgItemText(hwndDlg, 1502, gUsername, (int)gUsername_len);
 
 
//TODO : Provide a safe default if registry is misconfigured
//TODO : Provide a safe default if registry is misconfigured
GetSelfServeSetting(L"Username", username, sizeof username / sizeof *username);
TRACE(eERROR, L"Switching to selfservice user %s\n", username);
 
/branches/selfserve/GINA/GinaHook.c
522,7 → 522,7
 
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", 0, KEY_WRITE, &reg) == ERROR_SUCCESS)
{
RegSetValueEx(reg, L"DefaultUserName", 0, REG_SZ, (BYTE*)gUsername, sizeof(wchar_t)*(wcslen(gUsername)+1));
RegSetValueEx(reg, L"DefaultUserName", 0, REG_SZ, (BYTE*)gUsername, (DWORD)sizeof(wchar_t)*(wcslen(gUsername)+1));
RegCloseKey(reg);
*gUsername = 0;
}
/branches/selfserve/GINA/global.h
51,7 → 51,7
EXTERN const wchar_t gEncryptedTag[];
EXTERN const size_t gEncryptedTag_len;
EXTERN wchar_t gEncryptedRandomSelfservePassword[];
EXTERN const size_t gEncryptedRandomSelfservePassword_len;
EXTERN const DWORD gEncryptedRandomSelfservePassword_len;
 
#define AUCUN_PWLEN (16)
 
/branches/selfserve/GINA/randpasswd.cpp
27,7 → 27,7
 
if (CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_MACHINE_KEYSET|CRYPT_VERIFYCONTEXT))
{
if (CryptGenRandom(hCryptProv, sizeof(wchar_t)*size, (BYTE*)buffer))
if (CryptGenRandom(hCryptProv, (DWORD)sizeof(wchar_t)*size, (BYTE*)buffer))
{
for(size_t i=0; i<size; ++i)
{
36,8 → 36,8
//random by a random, valid password char.
buffer[i] = SuggestedUnicodePasswordChars[buffer[i]%(nSuggestedUnicodePasswordChars-1)];
}
result = size;
buffer[size] = 0;
result = (int)size;
buffer[size] = 0;
CryptReleaseContext(hCryptProv, 0);
}
}