mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 16:36:48 +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
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue