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>
This commit is contained in:
parent
bffd21ad80
commit
166913fb23
|
@ -234,6 +234,10 @@ load_user_profile (HANDLE token, struct passwd *pw, cygpsid &usersid)
|
||||||
WCHAR userpath[MAX_PATH];
|
WCHAR userpath[MAX_PATH];
|
||||||
PROFILEINFOW pi;
|
PROFILEINFOW pi;
|
||||||
|
|
||||||
|
/* Initialize */
|
||||||
|
if (!cygheap->dom.init ())
|
||||||
|
return NULL;
|
||||||
|
|
||||||
extract_nt_dom_user (pw, domain, username);
|
extract_nt_dom_user (pw, domain, username);
|
||||||
usersid.string (sid);
|
usersid.string (sid);
|
||||||
debug_printf ("user: <%W> <%W> <%W>", username, domain, 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;
|
QUOTA_LIMITS quota;
|
||||||
HANDLE token = NULL;
|
HANDLE token = NULL;
|
||||||
|
|
||||||
|
/* Initialize */
|
||||||
|
if (!cygheap->dom.init ())
|
||||||
|
return NULL;
|
||||||
|
|
||||||
push_self_privilege (SE_TCB_PRIVILEGE, true);
|
push_self_privilege (SE_TCB_PRIVILEGE, true);
|
||||||
|
|
||||||
if (logon)
|
if (logon)
|
||||||
|
|
Loading…
Reference in New Issue