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>2008-07-09 15:58:38 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-07-09 15:58:38 +0400
commit5558de95e59c62d23d70f64fb7dc510f4f77477f (patch)
tree426aec61c3437439f898c6800b3db29f6f4ba509 /winsup/cygwin/uinfo.cc
parent8f7208243ed7ac12a297eef5cdb2f3250c2185e7 (diff)
* autoload.cc (DsGetDcNameW): Replace DsGetDcNameA.
* dcrt0.cc (child_info_spawn::handle_spawn): Drop artificial supplementary group list from calling setgroups in parent. * grp.cc (internal_getgroups): Drop 9x-only code. Reformat. * sec_auth.cc (get_logon_server): Do everything in WCHAR only. (get_user_groups): Ditto. Use wlogonserver in LookupAccountNameW calls, too. (is_group_member): Get logon server as first argument and use in call to NetLocalGroupGetMembers. (get_user_local_groups): Get logon server as first argument and use in calls to NetLocalGroupEnum and LookupAccountNameW. Revamp to work more correctly in domain environments. (get_server_groups): Accommodate aforementioned changed function calls. * security.h (get_logon_server): Change prototype accordingly. * uinfo.cc (cygheap_user::env_logsrv): Accommodate changed get_logon_server call.
Diffstat (limited to 'winsup/cygwin/uinfo.cc')
-rw-r--r--winsup/cygwin/uinfo.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index c18ad8ebd..8a4b86df8 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -369,10 +369,12 @@ cygheap_user::env_logsrv (const char *name, size_t namelen)
if (!mydomain || ascii_strcasematch (myname, "SYSTEM"))
return almost_null;
- char logsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];
+ WCHAR wdomain[INTERNET_MAX_HOST_NAME_LENGTH + 1];
+ WCHAR wlogsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];
+ sys_mbstowcs (wdomain, INTERNET_MAX_HOST_NAME_LENGTH + 1, mydomain);
cfree_and_set (plogsrv, almost_null);
- if (get_logon_server (mydomain, logsrv, NULL, false))
- plogsrv = cstrdup (logsrv);
+ if (get_logon_server (wdomain, wlogsrv, false))
+ sys_wcstombs_alloc (&plogsrv, HEAP_STR, wlogsrv);
return plogsrv;
}