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-02-09 23:44:56 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-02-09 23:44:56 +0400
commit1ca20a1cd208e95f5e38ed8b8bcc6a2dad376228 (patch)
tree0c90ef25cc428eed933d882d3d73c333a42c6319 /winsup/cygwin/tlsoffsets64.h
parent01fc6f8d21299ef8e196d2155cd35973d08f398e (diff)
Introduce reading passwd/group entries from SAM/AD. Introduce
/etc/nsswitch.conf file to configure it. * Makefile.in (DLL_OFILES): Add ldap.o. * autoload.cc: Import ldap functions from wldap32.dll. (DsEnumerateDomainTrustsW): Import. (NetGroupGetInfo): Import. * cygheap.h (class cygheap_domain_info): New class to keep global domain info. (class cygheap_pwdgrp): New class to keep passwd/group caches and configuration info from /etc/nssswitch.conf. (struct init_cygheap): Add cygheap_domain_info member "dom" and cygheap_pwdgrp member "pg". * cygtls.h (struct _local_storage): Remove unused member "res". Rearrange slightly, Add members pwbuf and grbuf to implement non-caching passwd/group fetching from SAM/AD. Make pw_pos and pw_pos unsigned. * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Add RFC 2307 uid/gid mapping. * fhandler_process.cc: Drop including pwdgrp.h. * fhandler_procsysvipc.cc: Ditto. * fhandler_registry.cc (fhandler_registry::fstat): Set key uid/gid to ILLEGAL_UID/ILLEGAL_GID rather than UNKNOWN_UID/UNKNOWN_GID. * grp.cc (group_buf): Drop. (gr): Drop. (pwdgrp::parse_group): Fill pg_grp. (pwdgrp::read_group): Remove. (pwdgrp::init_grp): New method. (pwdgrp::prep_tls_grbuf): New method. (pwdgrp::find_group): New methods. (internal_getgrsid): Convert to call new pwdgrp methods. (internal_getgrnam): Ditto. (internal_getgrgid): Ditto. (getgrgid_r): Drop 2nd parameter from internal_getgrgid call. (getgrgid32): Ditto. (getgrnam_r): Ditto for internal_getgrnam. (getgrnam32): Ditto. (getgrent32): Convert to call new pwdgrp methods. (internal_getgrent): Remove. (internal_getgroups): Simplify, especially drop calls to internal_getgrent. * ldap.cc: New file implementing cyg_ldap class for LDAP access to AD and RFC 2307 server. * ldap.h: New header, declaring cyg_ldap class. * passwd.cc (passwd_buf): Drop. (pr): Drop. (pwdgrp::parse_passwd): Fill pg_pwd. (pwdgrp::read_passwd): Remove. (pwdgrp::init_pwd): New method. (pwdgrp::prep_tls_pwbuf): New method. (find_user): New methods. (internal_getpwsid): Convert to call new pwdgrp methods. (internal_getpwnam): Ditto. (internal_getpwuid): Ditto. (getpwuid32): Drop 2nd parameter from internal_getpwuid call. (getpwuid_r): Ditto. (getpwnam): Ditto for internal_getpwnam. (getpwnam_r): Ditto. (getpwent): Convert to call new pwdgrp methods. * path.cc (class etc): Remove all methods. * path.h (class etc): Drop. * pinfo.cc (pinfo_basic::pinfo_basic): Set gid to ILLEGAL_GID rather than UNKNOWN_GID. (pinfo_init): Ditto. * pwdgrp.h (internal_getpwnam): Drop 2nd parameter from declaration. (internal_getpwuid): Ditto. (internal_getgrgid): Ditto. (internal_getgrnam): Ditto. (internal_getgrent): Drop declaration. (enum fetch_user_arg_type_t): New type. (struct fetch_user_arg_t): New type. (struct pg_pwd): New type. (struct pg_grp): New type. (class pwdgrp): Rework to provide functions for file and db requests and caching. (class ugid_cache_t): New class to provide RFC 2307 uid map caching. (ugid_cache): Declare. * sec_acl.cc: Drop including pwdgrp.h. * sec_auth.cc: Drop including dsgetdc.h and pwdgrp.h. (get_logon_server): Convert third parameter to ULONG flags argument to allow arbitrary flags values in DsGetDcNameW call and change calls to this function throughout. Use cached account domain name rather than calling GetComputerNameW. (get_unix_group_sidlist): Remove. (get_server_groups): Drop call to get_unix_group_sidlist. (verify_token): Rework token group check without calling internal_getgrent. * sec_helper.cc (cygpsid::pstring): New methods, like string() but return pointer to end of string. (cygsid::getfromstr): Add wide character implementation. (get_sids_info): Add RFC 2307 uid/gid mapping for Samba shares. * security.cc: Drop including pwdgrp.h. * security.h (DEFAULT_UID): Remove. (UNKNOWN_UID): Remove. (UNKNOWN_GID): Remove. (uinfo_init): Move here from winsup.h. (ILLEGAL_UID): Ditto. (ILLEGAL_GID): Ditto. (UNIX_POSIX_OFFSET): Define. Add lengthy comment. (UNIX_POSIX_MASK): Ditto. (MAP_UNIX_TO_CYGWIN_ID): Ditto. (ILLEGAL_UID16): Move here from winsup.h. (ILLEGAL_GID16): Ditto. (uid16touid32): Ditto. (gid16togid32): Ditto. (sid_id_auth): New convenience macro for SID component access. (sid_sub_auth_count): Ditto. (sid_sub_auth): Ditto. (sid_sub_auth_rid): Ditto. (cygpsid::pstring): Declare. (cygsid::getfromstr): Declare wide character variant. (cygsid::operator=): Ditto. (cygsid::operator*=): Ditto. (get_logon_server): Change declaration according to source code. * setlsapwd.cc (setlsapwd): Drop 2nd parameter from internal_getpwnam call. * shared.cc (memory_init): Call cygheap->pg.init in first process. * syscalls.cc: Drop including pwdgrp.h. * tlsoffsets.h: Regenerate. * tlsoffsets64.h: Ditto. * uinfo.cc (internal_getlogin): Drop gratuitious internal_getpwuid call. Fix debug output. Overwrite user gid in border case of a missing passwd file while a group file exists. (pwdgrp::add_line): Allocate memory on cygheap. (pwdgrp::load): Remove. (ugid_cache): Define. (cygheap_pwdgrp::init): New method. (cygheap_pwdgrp::nss_init_line): New method. (cygheap_pwdgrp::_nss_init): New method. (cygheap_domain_info::init): New method. (logon_sid): Define. (get_logon_sid): New function. (pwdgrp::add_account_post_fetch): New method. (pwdgrp::add_account_from_file): New methods. (pwdgrp::add_account_from_windows): New methods. (pwdgrp::check_file): New method. (pwdgrp::fetch_account_from_line): New method. (pwdgrp::fetch_account_from_file): New method. (pwdgrp::fetch_account_from_windows): New method. * winsup.h: Move aforementioned macros and declarations to security.h.
Diffstat (limited to 'winsup/cygwin/tlsoffsets64.h')
-rw-r--r--winsup/cygwin/tlsoffsets64.h216
1 files changed, 108 insertions, 108 deletions
diff --git a/winsup/cygwin/tlsoffsets64.h b/winsup/cygwin/tlsoffsets64.h
index f85dae242..e966d4567 100644
--- a/winsup/cygwin/tlsoffsets64.h
+++ b/winsup/cygwin/tlsoffsets64.h
@@ -3,115 +3,115 @@
//; $tls::start_offset = -12800;
//; $tls::locals = -12800;
//; $tls::plocals = 0;
-//; $tls::local_clib = -11200;
-//; $tls::plocal_clib = 1600;
-//; $tls::__dontuse = -11200;
-//; $tls::p__dontuse = 1600;
-//; $tls::func = -9312;
-//; $tls::pfunc = 3488;
-//; $tls::saved_errno = -9304;
-//; $tls::psaved_errno = 3496;
-//; $tls::sa_flags = -9300;
-//; $tls::psa_flags = 3500;
-//; $tls::oldmask = -9296;
-//; $tls::poldmask = 3504;
-//; $tls::deltamask = -9288;
-//; $tls::pdeltamask = 3512;
-//; $tls::errno_addr = -9280;
-//; $tls::perrno_addr = 3520;
-//; $tls::sigmask = -9272;
-//; $tls::psigmask = 3528;
-//; $tls::sigwait_mask = -9264;
-//; $tls::psigwait_mask = 3536;
-//; $tls::sigwait_info = -9256;
-//; $tls::psigwait_info = 3544;
-//; $tls::signal_arrived = -9248;
-//; $tls::psignal_arrived = 3552;
-//; $tls::will_wait_for_signal = -9240;
-//; $tls::pwill_wait_for_signal = 3560;
-//; $tls::thread_context = -9232;
-//; $tls::pthread_context = 3568;
-//; $tls::thread_id = -8400;
-//; $tls::pthread_id = 4400;
-//; $tls::infodata = -8396;
-//; $tls::pinfodata = 4404;
-//; $tls::tid = -8248;
-//; $tls::ptid = 4552;
-//; $tls::_ctinfo = -8240;
-//; $tls::p_ctinfo = 4560;
-//; $tls::andreas = -8232;
-//; $tls::pandreas = 4568;
-//; $tls::wq = -8224;
-//; $tls::pwq = 4576;
-//; $tls::sig = -8176;
-//; $tls::psig = 4624;
-//; $tls::incyg = -8172;
-//; $tls::pincyg = 4628;
-//; $tls::spinning = -8168;
-//; $tls::pspinning = 4632;
-//; $tls::stacklock = -8164;
-//; $tls::pstacklock = 4636;
-//; $tls::stackptr = -8160;
-//; $tls::pstackptr = 4640;
-//; $tls::stack = -8152;
-//; $tls::pstack = 4648;
-//; $tls::initialized = -6104;
-//; $tls::pinitialized = 6696;
+//; $tls::local_clib = -11240;
+//; $tls::plocal_clib = 1560;
+//; $tls::__dontuse = -11240;
+//; $tls::p__dontuse = 1560;
+//; $tls::func = -9352;
+//; $tls::pfunc = 3448;
+//; $tls::saved_errno = -9344;
+//; $tls::psaved_errno = 3456;
+//; $tls::sa_flags = -9340;
+//; $tls::psa_flags = 3460;
+//; $tls::oldmask = -9336;
+//; $tls::poldmask = 3464;
+//; $tls::deltamask = -9328;
+//; $tls::pdeltamask = 3472;
+//; $tls::errno_addr = -9320;
+//; $tls::perrno_addr = 3480;
+//; $tls::sigmask = -9312;
+//; $tls::psigmask = 3488;
+//; $tls::sigwait_mask = -9304;
+//; $tls::psigwait_mask = 3496;
+//; $tls::sigwait_info = -9296;
+//; $tls::psigwait_info = 3504;
+//; $tls::signal_arrived = -9288;
+//; $tls::psignal_arrived = 3512;
+//; $tls::will_wait_for_signal = -9280;
+//; $tls::pwill_wait_for_signal = 3520;
+//; $tls::thread_context = -9272;
+//; $tls::pthread_context = 3528;
+//; $tls::thread_id = -8440;
+//; $tls::pthread_id = 4360;
+//; $tls::infodata = -8436;
+//; $tls::pinfodata = 4364;
+//; $tls::tid = -8288;
+//; $tls::ptid = 4512;
+//; $tls::_ctinfo = -8280;
+//; $tls::p_ctinfo = 4520;
+//; $tls::andreas = -8272;
+//; $tls::pandreas = 4528;
+//; $tls::wq = -8264;
+//; $tls::pwq = 4536;
+//; $tls::sig = -8216;
+//; $tls::psig = 4584;
+//; $tls::incyg = -8212;
+//; $tls::pincyg = 4588;
+//; $tls::spinning = -8208;
+//; $tls::pspinning = 4592;
+//; $tls::stacklock = -8204;
+//; $tls::pstacklock = 4596;
+//; $tls::stackptr = -8200;
+//; $tls::pstackptr = 4600;
+//; $tls::stack = -8192;
+//; $tls::pstack = 4608;
+//; $tls::initialized = -6144;
+//; $tls::pinitialized = 6656;
//; __DATA__
#define tls_locals (-12800)
#define tls_plocals (0)
-#define tls_local_clib (-11200)
-#define tls_plocal_clib (1600)
-#define tls___dontuse (-11200)
-#define tls_p__dontuse (1600)
-#define tls_func (-9312)
-#define tls_pfunc (3488)
-#define tls_saved_errno (-9304)
-#define tls_psaved_errno (3496)
-#define tls_sa_flags (-9300)
-#define tls_psa_flags (3500)
-#define tls_oldmask (-9296)
-#define tls_poldmask (3504)
-#define tls_deltamask (-9288)
-#define tls_pdeltamask (3512)
-#define tls_errno_addr (-9280)
-#define tls_perrno_addr (3520)
-#define tls_sigmask (-9272)
-#define tls_psigmask (3528)
-#define tls_sigwait_mask (-9264)
-#define tls_psigwait_mask (3536)
-#define tls_sigwait_info (-9256)
-#define tls_psigwait_info (3544)
-#define tls_signal_arrived (-9248)
-#define tls_psignal_arrived (3552)
-#define tls_will_wait_for_signal (-9240)
-#define tls_pwill_wait_for_signal (3560)
-#define tls_thread_context (-9232)
-#define tls_pthread_context (3568)
-#define tls_thread_id (-8400)
-#define tls_pthread_id (4400)
-#define tls_infodata (-8396)
-#define tls_pinfodata (4404)
-#define tls_tid (-8248)
-#define tls_ptid (4552)
-#define tls__ctinfo (-8240)
-#define tls_p_ctinfo (4560)
-#define tls_andreas (-8232)
-#define tls_pandreas (4568)
-#define tls_wq (-8224)
-#define tls_pwq (4576)
-#define tls_sig (-8176)
-#define tls_psig (4624)
-#define tls_incyg (-8172)
-#define tls_pincyg (4628)
-#define tls_spinning (-8168)
-#define tls_pspinning (4632)
-#define tls_stacklock (-8164)
-#define tls_pstacklock (4636)
-#define tls_stackptr (-8160)
-#define tls_pstackptr (4640)
-#define tls_stack (-8152)
-#define tls_pstack (4648)
-#define tls_initialized (-6104)
-#define tls_pinitialized (6696)
+#define tls_local_clib (-11240)
+#define tls_plocal_clib (1560)
+#define tls___dontuse (-11240)
+#define tls_p__dontuse (1560)
+#define tls_func (-9352)
+#define tls_pfunc (3448)
+#define tls_saved_errno (-9344)
+#define tls_psaved_errno (3456)
+#define tls_sa_flags (-9340)
+#define tls_psa_flags (3460)
+#define tls_oldmask (-9336)
+#define tls_poldmask (3464)
+#define tls_deltamask (-9328)
+#define tls_pdeltamask (3472)
+#define tls_errno_addr (-9320)
+#define tls_perrno_addr (3480)
+#define tls_sigmask (-9312)
+#define tls_psigmask (3488)
+#define tls_sigwait_mask (-9304)
+#define tls_psigwait_mask (3496)
+#define tls_sigwait_info (-9296)
+#define tls_psigwait_info (3504)
+#define tls_signal_arrived (-9288)
+#define tls_psignal_arrived (3512)
+#define tls_will_wait_for_signal (-9280)
+#define tls_pwill_wait_for_signal (3520)
+#define tls_thread_context (-9272)
+#define tls_pthread_context (3528)
+#define tls_thread_id (-8440)
+#define tls_pthread_id (4360)
+#define tls_infodata (-8436)
+#define tls_pinfodata (4364)
+#define tls_tid (-8288)
+#define tls_ptid (4512)
+#define tls__ctinfo (-8280)
+#define tls_p_ctinfo (4520)
+#define tls_andreas (-8272)
+#define tls_pandreas (4528)
+#define tls_wq (-8264)
+#define tls_pwq (4536)
+#define tls_sig (-8216)
+#define tls_psig (4584)
+#define tls_incyg (-8212)
+#define tls_pincyg (4588)
+#define tls_spinning (-8208)
+#define tls_pspinning (4592)
+#define tls_stacklock (-8204)
+#define tls_pstacklock (4596)
+#define tls_stackptr (-8200)
+#define tls_pstackptr (4600)
+#define tls_stack (-8192)
+#define tls_pstack (4608)
+#define tls_initialized (-6144)
+#define tls_pinitialized (6656)