* 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.
This commit is contained in:
@ -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 <sys/types.h>
|
||||
#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;
|
||||
|
Reference in New Issue
Block a user