Commit 0521a541 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

While creating the wine config key, make sure that only Wine's subkeys

are volatile.
parent e8742ddd
...@@ -958,7 +958,15 @@ int PROFILE_LoadWineIni(void) ...@@ -958,7 +958,15 @@ int PROFILE_LoadWineIni(void)
char buffer[MAX_PATHNAME_LEN]; char buffer[MAX_PATHNAME_LEN];
const char *p; const char *p;
FILE *f; FILE *f;
HKEY hKeySW;
/* make sure HKLM\\Software exists as non-volatile key */
if (RegCreateKeyA( HKEY_LOCAL_MACHINE, "Software", &hKeySW ))
{
ERR("Cannot create config registry key\n" );
return 0;
}
RegCloseKey( hKeySW );
if (RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config", 0, NULL, if (RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config", 0, NULL,
REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &wine_profile_key, NULL )) REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &wine_profile_key, NULL ))
{ {
...@@ -1003,7 +1011,7 @@ int PROFILE_LoadWineIni(void) ...@@ -1003,7 +1011,7 @@ int PROFILE_LoadWineIni(void)
goto found; goto found;
} }
MESSAGE( "Can't open configuration file %s or $HOME%s\n", MESSAGE( "Can't open configuration file %s or $HOME%s\n",
WINE_INI_GLOBAL, PROFILE_WineIniName ); WINE_INI_GLOBAL, PROFILE_WineIniName );
return 0; return 0;
found: found:
......
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