Cygwin: user profile: fetch roaming profile path via LDAP

Commit 649911fb40 avoids the
calls to NetUserGetGroups and NetUserGetLocalGroups since
these can take a lot of time.  The same problem potentially
occurs when loading the user profile.  The code fetches
the roaming profile path calling NetUserGetInfo, which also
can be rather slow.

To avoid this problem, fetch the profile patch using LDAP.
Also, don't bail out early if the user's registry hive already
exists.  This may result in outdated information.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2019-02-23 17:22:44 +01:00
parent 649911fb40
commit 322ab51659
3 changed files with 48 additions and 21 deletions

View File

@@ -63,4 +63,6 @@ public:
PWCHAR get_account_name ()
{ return get_string_attribute (L"sAMAccountName"); }
gid_t get_unix_gid () { return get_num_attribute (L"gidNumber"); }
PWCHAR get_profile_path ()
{ return get_string_attribute (L"profilePath"); }
};