Commit Graph

15597 Commits

Author SHA1 Message Date
Jeff Johnston e59026e844 2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
* nds32/crt0.S: Initialize ITB base.
        * nds32/crt1.S: Ditto.
2014-03-21 20:58:54 +00:00
Jeff Johnston 31b1f3e55f 2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
* nds32/Makefile.in: Alter filename.
        * nds32/syscall_argv.S: Rename to _argv.S
        * nds32/syscall_argvlen.S: Rename to _argvlen.S
        * nds32/syscall_chdir.S: Rename to _chdir.S
        * nds32/syscall_chmod.S: Rename to _chmod.S
        * nds32/syscall_close.S: Rename to _close.S
        * nds32/syscall_exit.S: Rename to _exit.S
        * nds32/syscall_fstat.S: Rename to _fstat.S
        * nds32/syscall_getpid.S: Rename to _getpid.S
        * nds32/syscall_gettimeofday.S: Rename to _gettimeofday.S
        * nds32/syscall_isatty.S: Rename to _isatty.S
        * nds32/syscall_kill.S: Rename to _kill.S
        * nds32/syscall_link.S: Rename to _link.S
        * nds32/syscall_lseek.S: Rename to _lseek.S
        * nds32/syscall_open.S: Rename to _open.S
        * nds32/syscall_read.S: Rename to _read.S
        * nds32/syscall_rename.S: Rename to _rename.S
        * nds32/syscall_sbrk.S: Rename to _sbrk.S
        * nds32/syscall_stat.S: Rename to _stat.S
        * nds32/syscall_system.S: Rename to _system.S
        * nds32/syscall_time.S: Rename to _time.S
        * nds32/syscall_times.S: Rename to _times.S
        * nds32/syscall_unlink.S: Rename to _unlink.S
        * nds32/syscall_utime.S: Rename to _utime.S
        * nds32/syscall_write.S: Rename to _write.S
2014-03-21 20:55:57 +00:00
Jeff Johnston 8194dcec36 2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
* nds32/syscall_argv.S: Correct the method to set errno.
        * nds32/syscall_argvlen.S: Ditto.
        * nds32/syscall_chdir.S: Ditto.
        * nds32/syscall_chmod.S: Ditto.
        * nds32/syscall_close.S: Ditto.
        * nds32/syscall_error_handler.S: Ditto.
        * nds32/syscall_fstat.S: Ditto.
        * nds32/syscall_getpid.S: Ditto.
        * nds32/syscall_gettimeofday.S: Ditto.
        * nds32/syscall_isatty.S: Ditto.
        * nds32/syscall_kill.S: Ditto.
        * nds32/syscall_link.S: Ditto.
        * nds32/syscall_lseek.S: Ditto.
        * nds32/syscall_open.S: Ditto.
        * nds32/syscall_read.S: Ditto.
        * nds32/syscall_rename.S: Ditto.
        * nds32/syscall_sbrk.S: Ditto.
        * nds32/syscall_stat.S: Ditto.
        * nds32/syscall_system.S: Ditto.
        * nds32/syscall_time.S: Ditto.
        * nds32/syscall_times.S: Ditto.
        * nds32/syscall_unlink.S: Ditto.
        * nds32/syscall_utime.S: Ditto.
        * nds32/syscall_write.S: Ditto.
2014-03-21 20:34:46 +00:00
Jeff Johnston c18decccef 2014-03-21 Sabrina Ni <sabrinanitw@gmail.com>
* libc/machine/nds32/setjmp.S: Keep jmp_buff sync with GDB.
2014-03-21 20:28:57 +00:00
Jeff Johnston 488d885bf3 2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
* nds32/crt0.S: Use pseudo-instruction "bal frame" to replace
        "la + jral".
        * nds32/crt1.S: Ditto.
2014-03-21 20:27:41 +00:00
Jeff Johnston d35d103f08 2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
* nds32/crt0.S: Eliminate initialization for $fp.
        * nds32/crt1.S: Ditto.
2014-03-21 20:26:01 +00:00
Jeff Johnston b899f01579 2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
* nds32/crt0.S: Refine.
        * nds32/crt1.S: Refine.
2014-03-21 20:24:04 +00:00
Jeff Johnston 5ff6903e69 2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
* nds32/crt0.S: Set argc=argv=env=0.
        * nds32/crt1.S: Ditto.
2014-03-21 20:22:29 +00:00
Jeff Johnston 7f4230bdc8 2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
* nds32/Makefile.in: Add syscall_error_handler.o.
        * nds32/syscall_error_handler.S: New.
        * nds32/syscall_extra.h: Reduce code size.
2014-03-21 20:20:53 +00:00
Jeff Johnston 9246fbeced 2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
* nds32/syscall_extra.h: Define macro.
        * nds32/syscall_argv.S: Use define macro.
        * nds32/syscall_argvlen.S: Ditto.
        * nds32/syscall_chdir.S: Ditto.
        * nds32/syscall_chmod.S: Ditto.
        * nds32/syscall_close.S: Ditto.
        * nds32/syscall_fstat.S: Ditto.
        * nds32/syscall_getpid.S: Ditto.
        * nds32/syscall_gettimeofday.S: Ditto.
        * nds32/syscall_isatty.S: Ditto.
        * nds32/syscall_kill.S: Ditto.
        * nds32/syscall_link.S: Ditto.
        * nds32/syscall_lseek.S: Ditto.
        * nds32/syscall_open.S: Ditto.
        * nds32/syscall_read.S: Ditto.
        * nds32/syscall_rename.S: Ditto.
        * nds32/syscall_stat.S: Ditto.
        * nds32/syscall_system.S: Ditto.
        * nds32/syscall_time.S: Ditto.
        * nds32/syscall_times.S: Ditto.
        * nds32/syscall_unlink.S: Ditto.
        * nds32/syscall_utime.S: Ditto.
        * nds32/syscall_write.S: Ditto.
2014-03-21 20:16:14 +00:00
Jeff Johnston 5805cb1f8c 2014-03-21 Sabrina Ni <sabrinanitw@gmail.com>
* libc/machine/nds32/setjmp.S: Optimize.
2014-03-21 20:09:10 +00:00
Christopher Faylor 364f6915f8 * fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Actually pass ioctl argument to
_ioctl.
2014-03-20 02:23:52 +00:00
Christopher Faylor 71f36ed3c2 * fhandler.h (fhandler_dev_dsp): Remove variable names from declarations.
(fhandler_dev_dsp::close_audio_in): Make __reg1.
(fhandler_dev_dsp::close_audio_out): Make __reg2.
* fhandler_dev_dsp.cc (fhandler_dev_dsp::close_audio_in): Make __reg1.
(fhandler_dev_dsp::close_audio_out): Make __reg2.
(fhandler_dev_dsp::close): Don't abruptly terminate sound just because we are
exiting.
2014-03-19 20:43:15 +00:00
Corinna Vinschen 2c1e724ba4 * exception.h (exception::handle_while_being_debugged): Declare.
(exception::exception): Install unhandled exception filter.
	* exceptions.cc (exception::handle_while_being_debugged): New method.
2014-03-19 16:08:21 +00:00
Corinna Vinschen bdd04d0a62 Fix ChangeLog 2014-03-19 13:06:06 +00:00
Corinna Vinschen 40e0c34e9c * fhandler_dsp.cc (fhandler_dev_dsp::fixup_after_fork): Actually call
_fixup_after_fork rather than looping forever.
	(fhandler_dev_dsp::fixup_after_exec): Ditto.
2014-03-19 13:05:33 +00:00
Christopher Faylor 203cd39dfe * fhandler_dsp.cc (fhandler_dev_dsp::fixup_after_fork): Actually call
_fixup_after_fork rather than looping forever.
(fhandler_dev_dsp::fixup_after_exec): Ditto.
2014-03-18 20:17:03 +00:00
Corinna Vinschen 8c0389d330 Partially revert patch from 2014-03-04.
* exception.h (exception::handler_installed): Declare.
	(exception::exception): Install vectored exception handler on x86_64.
	(exception::~exception): Remove for x86_64.
	* exceptions.cc (exception::handler_installed): Define.
2014-03-18 13:51:18 +00:00
Christopher Faylor 4f0b5a097d * sigproc.h (no_thread_exit_protect): New class.
* sigproc.cc (thread_exit): Use no_thread_exit_protect to determine if we need
to coordinate ThreadExit/ExitProcess.
* fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::stop): Use
no_thread_exit_protect to kludge around waiting for waveOutClose as it waits
for a thread that never exits.
(fhandler_dev_dsp::Audio_in::stop): Ditto for waveInClose.
* fhandler.h (fhandler_dev_dsp::base): New method.
(fhandler_dev_dsp::_read): Ditto.
(fhandler_dev_dsp::_write): Ditto.
(fhandler_dev_dsp::_ioctl): Ditto.
(fhandler_dev_dsp::_fixup_after_fork): Ditto.
(fhandler_dev_dsp::_fixup_after_exec): Ditto.
* fhandler_dsp.cc (fhandler_dev_dsp::read): Call real function via base()
pointer.
(fhandler_dev_dsp::write): Ditto.
(fhandler_dev_dsp::ioctl): Ditto.
(fhandler_dev_dsp::fixup_after_fork): Ditto.
(fhandler_dev_dsp::fixup_after_exec): Ditto.
(fhandler_dev_dsp::_read): Rename by adding an leading underscore.
(fhandler_dev_dsp::_write): Ditto.
(fhandler_dev_dsp::_ioctl): Ditto.
(fhandler_dev_dsp::_fixup_after_fork): Ditto.
(fhandler_dev_dsp::_fixup_after_exec): Ditto.
2014-03-17 04:41:35 +00:00
Corinna Vinschen 600afd99ab * Makefile.in (OBJS): Add pwdgrp.o.
* client.cc (client_request::handle_request): Handle
	CYGSERVER_REQUEST_PWDGRP message.
	* pwdgrp.cc: New file implementing CYGSERVER_REQUEST_PWDGRP.
2014-03-12 17:37:04 +00:00
Corinna Vinschen 29b7313d22 * cygheap.h (enum cygheap_pwdgrp::cache_t): Remove.
(cygheap_pwdgrp::caching): Convert to bool.
	(cygheap_pwdgrp::pwd_cache): Add cygserver member.
	(cygheap_pwdgrp::grp_cache): Ditto.
	(cygheap_pwdgrp::nss_db_caching): Drop.
	(cygheap_pwdgrp::nss_db_full_caching): Drop.
	(cygheap_pwdgrp::nss_cygserver_caching): New method.
	(cygheap_pwdgrp::nss_disable_cygserver_caching): New method.
	* cygserver.h (client_request::request_code_t): Add
	CYGSERVER_REQUEST_PWDGRP.
	* cygserver_pwdgrp.h: New file.
	* cygtls.h (struct _local_storage): Remove pwbuf and grbuf members.
	* grp.cc (pwdgrp::prep_tls_grbuf): Drop.
	(internal_getgrsid): Handle cygserver caching and rearrange to check
	the caches first.
	(internal_getgrnam): Ditto.
	(internal_getgrgid): Ditto.
	(gr_ent::enumerate_caches): Handle cygserver cache.
	* passwd.cc (pwdgrp::prep_tls_pwbuf): Drop.
	(internal_getpwsid): Handle cygserver caching and rearrange to check
	the caches first.
	(internal_getpwnam): Ditto.
	(internal_getpwuid): Ditto.
	(pw_ent::enumerate_caches): Handle cygserver cache.
	* pwdgrp.h (pwdgrp::add_account_from_cygserver): New method declaration.
	(pwdgrp::fetch_account_from_cygserver): New method declaration.
	(pwdgrp::prep_tls_pwbuf): Drop declaration.
	(pwdgrp::prep_tls_grbuf): Drop declaration.
	(pwdgrp::add_user_from_cygserver): New inline methods.
	(pwdgrp::add_group_from_cygserver): New inline methods.
	* tlsoffsets.h: Regenerate.
	* tlsoffsets64.h: Regenerate.
	* uinfo.cc (internal_getlogin): Call internal_getgroups if cygserver
	caching is not available.
	(cygheap_pwdgrp::init): Initialize pwd_cache.cygserver and
	grp_cache.cygserver.  Set caching to true.
	(cygheap_pwdgrp::nss_init_line): Drop db_cache handling entirely.
	(pwdgrp::add_account_from_windows): Drop no caching handling.
	(client_request_pwdgrp::client_request_pwdgrp): New method.
	(pwdgrp::fetch_account_from_cygserver): New method.
	(pwdgrp::add_account_from_cygserver): New method.

	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix formatting.
	* include/sys/cygwin.h: Ditto.
2014-03-12 17:36:56 +00:00
Corinna Vinschen 681bb2f78a * Throughout, fix format specifiers in debug statements to accommodate
x86_64.
2014-03-12 16:00:48 +00:00
Corinna Vinschen e4f48af0fd * uinfo.cc (pwdgrp::fetch_account_from_windows): Avoid crash on
non-domain member machines if an unknown SID comes in.
2014-03-12 15:46:07 +00:00
Corinna Vinschen 8861a80ee8 * include/cygwin/socket.h (IPV6_JOIN_GROUP): Revert.
(IPV6_LEAVE_GROUP): Ditto.
2014-03-12 09:44:33 +00:00
Corinna Vinschen 16c7ecbb9d Fix ChangeLog entry date. 2014-03-11 15:15:33 +00:00
Christopher Faylor 5c66535df9 * fhandler.h (dev_console::b): Redefine as CONSOLE_SCREEN_BUFFER_INFO for use
with older OS.
* fhandler_console.cc (dev_console::fillin): Ditto for
GetConsoleScreenBufferInfo.
2014-03-10 18:18:56 +00:00
Christopher Faylor ebfec24391 * fhandler_console.cc (dev_console::save_restore): Save entire line of current
cursor position.
2014-03-10 17:33:17 +00:00
Christopher Faylor cda5aac102 * fhandler_console.cc (fhandler_console::save_restore): Save only until last
written row and, because of this, don't bother trying to restore the screen
buffer size.  Set cursor position after refilling buffer.
(fhandler_console::write): Use absolute paths when saving/restoring cursor
position or suffer odd problems after a saved screen is restored.
2014-03-10 03:15:39 +00:00
Christopher Faylor dc5694dc88 * fhandler.h (fhandler_console::dwBufferSize): Delete.
(fhandler_console::dwCursorPosition): Ditto.
(fhandler_console::wAttributes): Ditto.
(fhandler_console::b): New field encompassing previously disparate screen
buffer info.
(fhandler_console::save_bufsize): Rename from savebufsiz
(fhandler_console::save_buf): Rename sfrom savebuf.
(fhandler_console::save_cursor): New field.
(fhandler_console::save_restore): New function.
(fhandler_console::con): Rename from dev_state.
(fhandler_console::focus_aware): Accommodate name change.
* fhandler_console.cc: Use 'b' field of dev_console throughout instead of
disparate names.  Accommodate dev_state -> con rename.
(dev_state:save_restore): New function.  Attempt to save the entire screen
buffer rather than just the visible part.  Clear the buffer when saving, like
Linux.
(fhandler_console::char_command): Use con.save_restore() for Save/restore
screen sequence.
2014-03-09 22:49:56 +00:00
Christopher Faylor bc7c78b225 * sigproc.cc (_cygtls::remove_wq): Reset thread_ev inside of lock. Set to NULL
when done.
2014-03-09 19:25:38 +00:00
Christopher Faylor e8036b41ab * fhandler_console.cc (fhandler_console::char_command): Properly use calculated
value rather than directly using dev_state.args[0].
2014-03-09 18:46:30 +00:00
Christopher Faylor 8e513b0217 * dir.cc (opendir): Propagate any errno from build_fh_name. 2014-03-09 18:39:14 +00:00
Corinna Vinschen 0e8dd88459 * pwdgrp.h (pwdgrp::is_passwd): New inline method.
(pwdgrp::is_group): New inline method.
	(add_account_from_windows): Drop group argument from declaration.
	(fetch_account_from_windows): Ditto.
	(check_file): Ditto.
	(add_user_from_windows): Call add_account_from_windows accordingly.
	(add_group_from_windows): Ditto.
	* uinfo.cc (pwdgrp::add_account_from_windows): Drop group argument.
	Use is_group method instead.
	(pwdgrp::check_file): Ditto.
	(pwdgrp::fetch_account_from_windows): Ditto.
	* grp.cc: Accommodate aforementioned changes.
	* passwd.cc: Ditto.
2014-03-07 20:38:48 +00:00
Corinna Vinschen 0b3ad39364 * libc/include/stdlib.h (strtold): Define if _HAVE_LONG_DOUBLE is
defined.
	* libc/stdlib/strtold.c (strtold): Ditto.  Call strtod on systems
	with long double == double, _strtold otherwise.
2014-03-07 20:06:54 +00:00
Corinna Vinschen 29adfd78bd * passwd.cc (pg_ent::enumerate_builtin): Convert pwd_builtins and
grp_builtins to array of cygpsid pointers.  Replace SID strings with
	pointers to well known SIDs.
	* sec_helper.cc (well_known_local_service_sid): Define.
	(well_known_network_service_sid): Define.
	(trusted_installer_sid): Define.
	* security.h (well_known_local_service_sid): Declare.
	(well_known_network_service_sid): Declare.
	(trusted_installer_sid): Declare.
	* uinfo.cc (pwdgrp::fetch_account_from_windows): Throughout set acc_type
	to SidTypeUnknown if LookupAccountXXX function failed.  Create
	simplified passwd entry for non-user accounts, except for LocalSystem.
	Add comment.
2014-03-06 18:54:08 +00:00
Corinna Vinschen 722c840b35 * setpwd.cc (client_request_setpwd::serve): Use RtlSecureZeroMemory to
delete password from memory.
2014-03-06 17:02:18 +00:00
Corinna Vinschen b8b4455f8f * setlsapwd.cc (setlsapwd): Use RtlSecureZeroMemory to delete password
from memory.
2014-03-06 17:00:52 +00:00
Corinna Vinschen 5e6b3cafa2 * ldap.cc (rediscover_thread): Remove.
(cyg_ldap::open): Remove code to rediscover DC.  It just won't do the
	right thing.
	(cyg_ldap::enumerate_ad_accounts): Change to be self-sufficient (no
	explicit open call required).  Enumerate on a DC of the domain itself
	instead of relying on delegation.  Remove ill-advised code trying to
	generate rootdse from domain name.
	* passwd.cc (pg_ent::enumerate_ad): Drop explicit call to
	cyg_ldap::open.
2014-03-05 20:58:33 +00:00
Corinna Vinschen 512ecab4a8 * include/cygwin/config.h (__TM_GMTOFF): Define.
(__TM_ZONE): Define.
2014-03-05 12:50:29 +00:00
Corinna Vinschen d5b32c8fad * libc/include/time.h (__TM_GMTOFF): Remove Cygwin-specific definition.
(__TM_ZONE): Ditto.
2014-03-05 12:49:40 +00:00
Corinna Vinschen 27afe3a4ab * localtime.cc: Define TM_GMTOFF and TM_ZONE based on __TM_GMTOFF and
__TM_ZONE being defined.  Throughout, write to these struct tm members
	only if CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS is true.
	* libc/strptime.cc: Ditto.
	* include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS):
	Define.
	(CYGWIN_VERSION_API_MINOR): Bump to 272.
2014-03-05 12:45:49 +00:00
Corinna Vinschen 07be216aab * libc/include/time.h (__TM_GMTOFF): Define on Cygwin.
(__TM_ZONE): Ditto.
	(struct tm): Add __TM_GMTOFF and __TM_ZONE members if they are defined.
2014-03-05 12:43:12 +00:00
Jeff Johnston 065c7717b7 2014-02-27 Joey Ye <joey.ye@arm.com>
* libnosys/sbrk.c (_sbrk): Remove TWS
2014-03-04 17:39:26 +00:00
Corinna Vinschen 4e3c8d9425 * exception.h (exception::handler_installed): Remove.
(exception::exception): Remove old code.  Manually install SEH handler
	instead.
	(exception::~exception): For x86_64, define frame end label.
	* exceptions.cc (exception::handler_installed): Remove.
2014-03-04 11:56:42 +00:00
Corinna Vinschen 17ff765184 * libc/include/machine/_default_types.h: Define unsigned type using
signed type macros in case unsigned type macros are not available.
2014-03-04 08:05:39 +00:00
Corinna Vinschen 6dde3146fb * exception.h (exception::exception): Install vectored exception
handler rather than vectored continue handler.
2014-03-03 15:38:59 +00:00
Corinna Vinschen c7b9a091a5 * sec_helper.cc (cygpsid::get_id): Move Samba SID->uid/gid mapping
from get_sids_info here.
	(get_sids_info): Vice versa.
	* security.cc (convert_samba_sd): New static function to map a Samba
	security descriptor to a security descriptor with UNIX users and groups
	converted to Windows SIDs per RFC 2307 mapping.
	(check_file_access): Call convert_samba_sd on Samba security
	descriptors.
2014-03-03 12:03:47 +00:00
Corinna Vinschen f024a32928 * uinfo.cc (pwdgrp::fetch_account_from_windows): Only fetch extended
user info if we're creating a passwd entry.  Add comment.
2014-02-28 19:10:40 +00:00
Corinna Vinschen 6cc7c925ce * cygheap.h (cygheap_user::sid): Return reference to cygpsid rather
than PSID.
	(cygheap_user::saved_sid): Ditto.
	(cygheap_pwdgrp::cache_t): New type.
	(cygheap_pwdgrp::caching): Convert to cache_t.
	(cygheap_pwdgrp::nss_db_caching): Change accordingly.
	(cygheap_pwdgrp::nss_db_full_caching): New inline method.
	* grp.cc (internal_getgroups): Reinvent.  Take cyg_ldap pointer as
	third parameter and use throughout.
	(getgroups32): Call internal_getgroups.
	* pwdgrp.h (internal_getgroups): Declare.
	* uinfo.cc (internal_getlogin): Partial rewrite to accommodate having
	no connection to the DC.  Give primary group from user token more
	weight.  Generate group entries for all groups in the user token if
	caching is set to NSS_FULL_CACHING.
	(cygheap_pwdgrp::init): Initialize caching to NSS_FULL_CACHING.
	(cygheap_pwdgrp::nss_init_line): Handle "db_cache: full".
	(pwdgrp::add_account_from_windows): Fix group handling in non-caching
	mode.
	(pwdgrp::fetch_account_from_windows): Default primary group for the
	current user to primary group from user token.  Check for primary
	domain first after LookupAccountSid failed.
2014-02-28 11:37:02 +00:00
Corinna Vinschen b39fa2c88d * autoload.cc (CheckTokenMembership): Import.
* external.cc (cygwin_internal): Call get_uid/get_gid instead of get_id.
	* grp.cc (internal_getgrsid): Take additional cyg_ldap pointer.
	Forward to pwdgrp::add_group_from_windows.
	(internal_getgrnam): Ditto.
	(internal_getgrgid): Ditto.
	(gr_ent::enumerate_local): Drop ugid_caching bool from call to
	pwdgrp::fetch_account_from_windows.
	(getgroups32): Rename from internal_getgroups and drop getgroups32 stub.
	Drop srchsid parameter and code handling it.  Add local cyg_ldap
	instance and forward to internal_getgrXXX.
	(getgroups): Call getgroups32.
	(get_groups): Add local cyg_ldap instance and forward to
	internal_getgrXXX.
	(getgrouplist): Ditto.
	(setgroups32): Ditto.
	* ldap.cc (cyg_ldap::open): Don't call close.  Return true if connection
	is already open.
	(cyg_ldap::remap_uid): Forward this to internal_getpwsid.
	(cyg_ldap::remap_gid): Forward this to internal_getgrsid.
	* passwd.cc (internal_getpwsid): Take additional cyg_ldap pointer.
	Forward to pwdgrp::add_user_from_windows.
	(internal_getpwnam): Ditto.
	(internal_getpwuid): Ditto.
	(pg_ent::enumerate_builtin): Drop ugid_caching bool from call to
	pwdgrp::fetch_account_from_windows.
	(pg_ent::enumerate_sam): Ditto.
	(pg_ent::enumerate_ad): Ditto.  Forward local cldap instead.
	* pwdgrp.h (internal_getpwsid): Align declaration to above change.
	(internal_getpwnam): Ditto.
	(internal_getpwuid): Ditto.
	(internal_getgrsid): Ditto.
	(internal_getgrgid): Ditto.
	(internal_getgrnam): Ditto.
	(internal_getgroups): Drop declaration.
	(pwdgrp::add_account_from_windows): Align declaration to below change.
	(pwdgrp::add_user_from_windows): Ditto.
	(pwdgrp::add_group_from_windows): Ditto.
	* sec_acl.cc (setacl): Add local cyg_ldap instance and forward to
	internal_getpwuid and internal_getgrgid.
	(getacl): Add local cyg_ldap instance and forward to cygpsid::get_id.
	(aclfromtext32): Add local cyg_ldap instance and forward to
	internal_getpwnam and internal_getgrnam.
	* sec_helper.cc (cygpsid::get_id): Take additional cyg_ldap pointer.
	Forward to internal_getgrsid and internal_getpwsid.
	(get_sids_info): Drop ldap_open.  Forward local cldap to
	internal_getpwsid and internal_getgrXXX.  Call CheckTokenMembership
	rather than internal_getgroups.
	* security.h (cygpsid::get_id): Add cyg_ldap pointer, drop default
	parameter.
	(cygpsid::get_uid): Add cyg_ldap pointer.  Call get_id accordingly.
	(cygpsid::get_gid): Ditto.
	* uinfo.cc (internal_getlogin): Add local cyg_ldap instance and forward
	to internal_getpwXXX and internal_getgrXXX calls.
	(pwdgrp::add_account_from_windows): Take additional cyg_ldap pointer.
	Forward to pwdgrp::fetch_account_from_windows.
	(fetch_posix_offset): Drop ldap_open argument and handling.  Get
	cyg_ldap instance as pointer.
	(pwdgrp::fetch_account_from_windows): Take additional cyg_ldap pointer.
	Use it if it's not NULL, local instance otherwise.  Drop ldap_open.
	Drop fetching extended group arguments from AD for speed.
2014-02-27 12:57:27 +00:00