Cygwin: user profile: Make an effort to unload unused user profiles

Does this work?  There's not much feedback given.

TODO: We might want to try unloading the user profile at process
exit as well, FWIW.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2019-02-23 17:30:44 +01:00
parent 331653a215
commit 71b8777a71
6 changed files with 25 additions and 3 deletions

View File

@@ -106,6 +106,9 @@ public:
HANDLE curr_primary_token; /* Just a copy of external or internal token */
HANDLE curr_imp_token; /* impersonation token derived from primary
token */
HANDLE imp_profile_token; /* Handle to the token used to load the
user profile in "imp_profile" */
HANDLE imp_profile; /* Handle to the user profile */
bool ext_token_is_restricted; /* external_token is restricted token */
bool curr_token_is_restricted; /* curr_primary_token is restricted token */
bool setuid_to_restricted; /* switch to restricted token by setuid () */