* 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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user