mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user