diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2019-03-01 21:08:09 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2019-03-01 21:08:44 +0100 |
commit | 166913fb23dd7ac0c63976a2f4e40a9e44ca41ca (patch) | |
tree | 91dec40e2f8c5d1d047efafac25e94c12b3766c6 | |
parent | bffd21ad8047601e56d229e619bbcdb76096d975 (diff) | |
download | cygnal-166913fb23dd7ac0c63976a2f4e40a9e44ca41ca.tar.gz cygnal-166913fb23dd7ac0c63976a2f4e40a9e44ca41ca.tar.bz2 cygnal-166913fb23dd7ac0c63976a2f4e40a9e44ca41ca.zip |
Cygwin: authentication: Always initialize domain info
...before calling any of its method. It's no safe bet that
it's already initialized when calling s4uauth and adding it
to load_user_profile certainly doesn't hurt.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/sec_auth.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec_auth.cc index ee740facc..2f0480124 100644 --- a/winsup/cygwin/sec_auth.cc +++ b/winsup/cygwin/sec_auth.cc @@ -234,6 +234,10 @@ load_user_profile (HANDLE token, struct passwd *pw, cygpsid &usersid) WCHAR userpath[MAX_PATH]; PROFILEINFOW pi; + /* Initialize */ + if (!cygheap->dom.init ()) + return NULL; + extract_nt_dom_user (pw, domain, username); usersid.string (sid); debug_printf ("user: <%W> <%W> <%W>", username, domain, sid); @@ -1533,6 +1537,10 @@ s4uauth (bool logon, PCWSTR domain, PCWSTR user, NTSTATUS &ret_status) QUOTA_LIMITS quota; HANDLE token = NULL; + /* Initialize */ + if (!cygheap->dom.init ()) + return NULL; + push_self_privilege (SE_TCB_PRIVILEGE, true); if (logon) |