From bef55bb5c3322c57a0136b63c490e61f230da9be Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 23 Feb 2015 20:51:12 +0000 Subject: * autoload.cc (LsaLookupSids): Import. * cygserver_pwdgrp.h: Include userinfo.h. Drop workaround defining fetch_user_arg_type_t locally. * grp.cc (internal_getgrsid_cachedonly): New function. (internal_getgrfull): Ditto. (internal_getgroups): Rearrange function. Center around fetching all cached group info first, calling LsaLookupSids on all so far non-cached groups second. Pass all available info to new internal_getgrfull call. * pwdgrp.h: Include userinfo.h. Move definitions of fetch_user_arg_type_t and fetch_user_arg_t there. (pwdgrp::add_group_from_windows): Declare with getting full group info. Called from internal_getgrfull. * uinfo.cc (pwdgrp::add_group_from_windows): Define. (pwdgrp::fetch_account_from_line): Add default case. (pwdgrp::fetch_account_from_file): Ditto. (pwdgrp::fetch_account_from_windows): Handle FULL_grp_arg. (client_request_pwdgrp::client_request_pwdgrp): Add default case. * userinfo.h: New header. (enum fetch_user_arg_type_t): Add FULL_grp_arg. (struct fetch_full_grp_t): New datatype. --- winsup/cygwin/cygserver_pwdgrp.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'winsup/cygwin/cygserver_pwdgrp.h') diff --git a/winsup/cygwin/cygserver_pwdgrp.h b/winsup/cygwin/cygserver_pwdgrp.h index 52b9b42ba..03a6a65d0 100644 --- a/winsup/cygwin/cygserver_pwdgrp.h +++ b/winsup/cygwin/cygserver_pwdgrp.h @@ -1,6 +1,6 @@ /* cygserver_pwdgrp.h: Request account information - Copyright 2014 Red Hat, Inc. + Copyright 2014, 2015 Red Hat, Inc. This file is part of Cygwin. @@ -13,21 +13,11 @@ details. */ #include #include "cygserver.h" +#include "userinfo.h" class transport_layer_base; class process_cache; -#ifdef __INSIDE_CYGWIN__ -#include "pwdgrp.h" -#else -/* Don't include pwdgrp.h, but keep this in sync. */ -enum fetch_user_arg_type_t { - SID_arg, - NAME_arg, - ID_arg -}; -#endif - class client_request_pwdgrp : public client_request { friend class client_request; -- cgit v1.2.3