mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[USERENV]
LoadUserProfileW: Add a hack to prevent a failure when a newly created user profile is loaded twice. This failure (sharing violation) is caused by the unimplemented NtUnloadKey function! This patch enables us to create and use our own user accounts. Please note that these accounts still have hard-coded group and privilege settings. svn path=/trunk/; revision=60823
This commit is contained in:
parent
7445605fbd
commit
b463d3a396
|
@ -1186,6 +1186,11 @@ LoadUserProfileW(IN HANDLE hToken,
|
|||
SidString.Buffer,
|
||||
szUserHivePath);
|
||||
AcquireRemoveRestorePrivilege(FALSE);
|
||||
|
||||
/* HACK: Do not fail if the profile has already been loaded! */
|
||||
if (Error == ERROR_SHARING_VIOLATION)
|
||||
Error = ERROR_SUCCESS;
|
||||
|
||||
if (Error != ERROR_SUCCESS)
|
||||
{
|
||||
DPRINT1("RegLoadKeyW() failed (Error %ld)\n", Error);
|
||||
|
|
Loading…
Reference in a new issue