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-11 14:00:36 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-07-11 14:00:36 +0400
commit9a51257715531da7089c0184a6b8ea0c68894825 (patch)
treed52c6a85102cea09a390450574a3b6a402ae23f1 /winsup/cygwin/cyglsa.h
parent186a804c1515daa4b61b78a9bcbbfe4fc14b788e (diff)
Change length for domain buffers from INTERNET_MAX_HOST_NAME_LENGTH to
MAX_DOMAIN_NAME_LEN throughout. * cyglsa.h (CYG_LSA_MAGIC): New value. (cyglsa_t): Define username and domain as WCHAR arrays. * errno.cc (errmap): Add mapping for ERROR_NONE_MAPPED. * sec_auth.cc: Drop 'w' prefix from WCHAR string variable names where appropriate. (extract_nt_dom_user): Prefer resolving by SID before resolving by domain\name pair. (cygwin_logon_user): Don't print cleartext password in debug output. Change comment. (get_user_groups): Revert calls to LookupAccountNameW to use NULL server instead of explicit server name, according to MSDN. (get_user_local_groups): Ditto. (get_server_groups): Fetch domain and user name from usersid per LookupAccountSidW instead of calling extract_nt_dom_user. (lsaauth): Fetch domain and user name from usersid per LookupAccountSidW instead of calling extract_nt_dom_user. * sec_helper.cc (cygpriv): Convert to wchar_t pointer array. (privilege_luid): Convert first parameter to PWCHAR. (privilege_name): Return wchar_t pointer. (set_privileges): Accommodate debug output. * security.h (privilege_luid): Change prototype accordingly.
Diffstat (limited to 'winsup/cygwin/cyglsa.h')
-rw-r--r--winsup/cygwin/cyglsa.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/cyglsa.h b/winsup/cygwin/cyglsa.h
index 4349de8cd..c9edece58 100644
--- a/winsup/cygwin/cyglsa.h
+++ b/winsup/cygwin/cyglsa.h
@@ -18,7 +18,11 @@ extern "C" {
#define CYG_LSA_PKGNAME "CygwinLsa"
-#define CYG_LSA_MAGIC 0x0379f014LU
+#define CYG_LSA_MAGIC_OLD1 0x0379f014LU
+/* First change to cyglsa_t.
+ - Username and domain are now of type WCHAR instead of char.
+ - domain is MAX_DOMAIN_NAME_LEN instead of INTERNET_MAX_HOST_NAME_LENGTH. */
+#define CYG_LSA_MAGIC 0x0379f115LU
/* Datastructures not defined in w32api. */
typedef PVOID *PLSA_CLIENT_REQUEST;
@@ -185,8 +189,8 @@ typedef struct
{
DWORD magic;
DWORD checksum;
- CHAR username[UNLEN + 1];
- CHAR domain[INTERNET_MAX_HOST_NAME_LENGTH + 1];
+ WCHAR username[UNLEN + 1];
+ WCHAR domain[MAX_DOMAIN_NAME_LEN + 1];
ULONG inf_size;
CYG_LSA_TOKEN_INFORMATION inf;
BYTE data[1];