diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-02-11 15:51:29 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-02-11 15:51:29 +0400 |
commit | 7fa5cbbfcdb4ff064ccc17d7fb514d3ff1ad8d2d (patch) | |
tree | c4e396629da24101629123b291c579a71e220415 /winsup/cygwin/pwdgrp.h | |
parent | 026a2445d17e937996ae582f6875fb66b6ac7186 (diff) |
* autoload.cc (NetLocalGroupGetInfo): Replace NetGroupGetInfo.
* cygheap.h (class cygheap_ugid_cache): Move ugid_cache_t type here
and rename.
(struct init_cygheap): Add cygheap_ugid_cache member "ugid_cache".
* pwdgrp.h (class ugid_cache_t): Remove here.
* fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Accommodate
move of ugid_cache to cygheap.
* sec_helper.cc (get_sids_info): Ditto.
* uinfo.cc (ugid_cache): Remove.
(pwdgrp::fetch_account_from_windows): Define id_val globally.
Move SidTypeAlias handling into SidTypeUser/SidTypeGroup branch since
aliases are handled like groups in SAM. Accommodate move of ugid_cache
to cygheap. Consolidate code reading SAM comments into a single branch
for both, SidTypeUser and SidTypeAlias. For SidTypeAlias, fix thinko
and call NetLocalGroupGetInfo rather than NetGroupGetInfo. Simplify
code setting Cygwin primary group for SAM accounts. Add code to handle
UNIX uid/gid from SAM comment.
Diffstat (limited to 'winsup/cygwin/pwdgrp.h')
-rw-r--r-- | winsup/cygwin/pwdgrp.h | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/winsup/cygwin/pwdgrp.h b/winsup/cygwin/pwdgrp.h index a93d2b979..4ed245104 100644 --- a/winsup/cygwin/pwdgrp.h +++ b/winsup/cygwin/pwdgrp.h @@ -141,42 +141,3 @@ public: struct group *find_group (const char *name); struct group *find_group (gid_t gid); }; - -class ugid_cache_t -{ - struct idmap { - uint32_t nfs_id; - uint32_t cyg_id; - }; - class idmaps { - uint32_t _cnt; - uint32_t _max; - idmap *_map; - public: - idmaps () : _cnt (0), _max (0), _map (NULL) {} - uint32_t get (uint32_t id) const - { - for (uint32_t i = 0; i < _cnt; ++i) - if (_map[i].nfs_id == id) - return _map[i].cyg_id; - return (uint32_t) -1; - } - void add (uint32_t nfs_id, uint32_t cyg_id) - { - if (_cnt >= _max) - _map = (idmap *) realloc (_map, (_max += 10) * sizeof (*_map)); - _map[_cnt].nfs_id = nfs_id; - _map[_cnt].cyg_id = cyg_id; - ++_cnt; - } - }; - idmaps uids; - idmaps gids; - -public: - uid_t get_uid (uid_t uid) const { return uids.get (uid); } - gid_t get_gid (gid_t gid) const { return gids.get (gid); } - void add_uid (uid_t nfs_uid, uid_t cyg_uid) { uids.add (nfs_uid, cyg_uid); } - void add_gid (gid_t nfs_gid, gid_t cyg_gid) { gids.add (nfs_gid, cyg_gid); } -}; -extern ugid_cache_t ugid_cache; |