Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2019-03-01 23:08:09 +0300
committerCorinna Vinschen <corinna@vinschen.de>2019-03-01 23:08:44 +0300
commit166913fb23dd7ac0c63976a2f4e40a9e44ca41ca (patch)
tree91dec40e2f8c5d1d047efafac25e94c12b3766c6
parentbffd21ad8047601e56d229e619bbcdb76096d975 (diff)
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.cc8
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)