Cywin: user profile: unload impersonation user profile on exit
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
dd3730ed9c
commit
bcb33dc4f0
@ -193,6 +193,11 @@ public:
|
|||||||
{
|
{
|
||||||
return effec_cygsid.string (buf);
|
return effec_cygsid.string (buf);
|
||||||
}
|
}
|
||||||
|
void exit ()
|
||||||
|
{
|
||||||
|
if (imp_profile_token && imp_profile)
|
||||||
|
unload_user_profile (imp_profile_token, imp_profile);
|
||||||
|
}
|
||||||
|
|
||||||
const char __reg3 *test_uid (char *&, const char *, size_t);
|
const char __reg3 *test_uid (char *&, const char *, size_t);
|
||||||
};
|
};
|
||||||
|
@ -224,6 +224,7 @@ pinfo::exit (DWORD n)
|
|||||||
exitcode = ((exitcode & 0xff) << 8) | ((exitcode >> 8) & 0xff);
|
exitcode = ((exitcode & 0xff) << 8) | ((exitcode >> 8) & 0xff);
|
||||||
sigproc_printf ("Calling dlls.cleanup_forkables n %y, exitcode %y", n, exitcode);
|
sigproc_printf ("Calling dlls.cleanup_forkables n %y, exitcode %y", n, exitcode);
|
||||||
dlls.cleanup_forkables ();
|
dlls.cleanup_forkables ();
|
||||||
|
cygheap->user.exit ();
|
||||||
sigproc_printf ("Calling ExitProcess n %y, exitcode %y", n, exitcode);
|
sigproc_printf ("Calling ExitProcess n %y, exitcode %y", n, exitcode);
|
||||||
if (!TerminateProcess (GetCurrentProcess (), exitcode))
|
if (!TerminateProcess (GetCurrentProcess (), exitcode))
|
||||||
system_printf ("TerminateProcess failed, %E");
|
system_printf ("TerminateProcess failed, %E");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user