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>2014-05-06 16:02:48 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-05-06 16:02:48 +0400
commit439b7db7850cb69d8119308c5b6f16d1e596161f (patch)
treed84452c8343f1da40e676deac5346d80570ba3eb /winsup/cygwin/winlean.h
parent67797a9560f77c1061ad5c901400abc7e9a4fcc2 (diff)
* grp.cc (internal_getgroups): Drop unused cygsid variable.
* sec_helper.cc (cygpsid::pstring): Use sid_sub_auth_count macro. (cygsid::get_sid): Use MAX_SUBAUTH_CNT rather than wrong constant 8. Don't call memcpy to copy subauthorities into SID, use assignment. (cygsid::getfromstr): Use MAX_SUBAUTH_CNT rather than wrong constant 8. * security.h (MAX_SUBAUTH_CNT): New definition. Set to 11 to cover Microsoft Accounts. (MAX_SID_LEN): Define in terms of SID member sizes and MAX_SUBAUTH_CNT. (DBGSID): Use MAX_SUBAUTH_CNT to define size of SubAuthority array. * uinfo.cc (pwdgrp::fetch_account_from_windows): Handle Micosoft Accounts. Handle them as well known group. Compare domain names case-insensitive. * winlean.h (PIPE_REJECT_REMOTE_CLIENTS): Drop temporary definition since Mingw64 catched up. (DNLEN): Redefine as 16. Explain why.
Diffstat (limited to 'winsup/cygwin/winlean.h')
-rw-r--r--winsup/cygwin/winlean.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/winsup/cygwin/winlean.h b/winsup/cygwin/winlean.h
index c50cf747a..162994854 100644
--- a/winsup/cygwin/winlean.h
+++ b/winsup/cygwin/winlean.h
@@ -1,6 +1,6 @@
/* winlean.h - Standard "lean" windows include
- Copyright 2010, 2011, 2012, 2013 Red Hat, Inc.
+ Copyright 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
This file is part of Cygwin.
@@ -58,11 +58,6 @@ details. */
#include <lmcons.h>
#include <ntdef.h>
-/* Temporary kludge for missing flag in Mingw64's w32api. */
-#ifndef PIPE_REJECT_REMOTE_CLIENTS
-#define PIPE_REJECT_REMOTE_CLIENTS 8
-#endif
-
#ifdef __undef_IN
#undef IN
#endif
@@ -79,6 +74,13 @@ details. */
#undef CRITICAL
#endif
+/* So-called "Microsoft Account" SIDs have a netbios domain name
+ "MicrosoftAccounts". The problem is, while DNLEN is 15, that domain
+ name is 16 chars :-P So we override DNLEN here to be 16, so that calls
+ to LookupAccountSid/Name don't fail if the buffer is based on DNLEN. */
+#undef DNLEN
+#define DNLEN 16
+
/* When Terminal Services are installed, the GetWindowsDirectory function
does not return the system installation dir, but a user specific directory
instead. That's not what we have in mind when calling GetWindowsDirectory