Commit Graph

15734 Commits

Author SHA1 Message Date
Richard Earnshaw 7bd00a0bef 2014-07-07 Pavel Pisa <pisa@cmp.felk.cvut.cz>
Richard Earnshaw  <rearnsha@arm.com>

	* libc/machine/arm/memchr.S (.arch): Require revision ARMv6t2.
2014-07-07 13:58:35 +00:00
Corinna Vinschen 2ccbe5129d * configure.in (--enable-newlib-nano-formatted-io): Set to "no"
by default.
	* configure: Regenerated.
2014-07-07 13:15:55 +00:00
Corinna Vinschen f135cbdd45 * fhandler_socket.cc (fhandler_socket::send_internal): Improve loop to
write streams in chunks of wmem() bytes to raise performance when
	writing small buffers.  Rename variables and add comments to help
	understanding the code in years to come.
2014-07-07 12:57:03 +00:00
Corinna Vinschen 72506dd846 * passwd.cc (pg_ent::enumerate_ad): Revert to simply skipping a domain
if opening the connection to the domain fails.
2014-07-07 10:22:51 +00:00
Corinna Vinschen f0c23915ec * libc/minires.c (minires_dprintf): Change "Minires" to "Resolv" to
differ from external minres lib.
	(res_nquerydomain): Fix off-by-one in domain concatenation.  Add debug
	output.
2014-07-07 08:40:31 +00:00
Rainer Orth e61375e471 * configure.ac: Don't accept isl 0.10.
* configure: Regenerate.
2014-07-05 21:09:07 +00:00
Jeff Johnston d34336767e 2014-07-04 Bin Cheng <bin.cheng@arm.com>
* README (--enable-newlib-nano-formatted-io): Describe.
        * acconfig.h (_NANO_FORMATTED_IO): Undef.
        * newlib.hin (_NANO_FORMATTED_IO): Undef.
        * configure.in (--enable-newlib-nano-formatted-io): New option.
        * configure: Regenerated.
        * libc/configure.in (--enable-newlib-nano-formatted-io): New option.
        * libc/configure: Regenerated.
        * libc/stdio/Makefile.am (NEWLIB_NANO_FORMATTED_IO): Support new
        configuration option.
        * libc/stdio/Makefile.in: Regenerated.
        * libc/stdio/asnprintf.c (_asniprintf_r, asniprintf): Use
        _NANO_FORMATTED_IO to declare alias prototypes.
        * libc/stdio/asprintf.c (_asiprintf_r, asiprintf): Ditto.
        * libc/stdio/dprintf.c (_diprintf_r, diprintf): Ditto.
        * libc/stdio/fprintf.c (_fiprintf_r, fiprintf): Ditto.
        * libc/stdio/fscanf.c (fiscanf, _fiscanf_r): Ditto.
        * libc/stdio/printf.c (_iprintf_r, iprintf): Ditto.
        * libc/stdio/scanf.c (iscanf, _iscanf_r): Ditto.
        * libc/stdio/snprintf.c (_sniprintf_r, sniprintf): Ditto.
        * libc/stdio/sprintf.c (_siprintf_r, siprintf): Ditto.
        * libc/stdio/sscanf.c (siscanf, _siscanf_r): Ditto.
        * libc/stdio/vasnprintf.c (_vasniprintf_r, vasniprintf): Ditto.
        * libc/stdio/vasprintf.c (vasiprintf, _vasiprintf_r): Ditto.
        * libc/stdio/vdprintf.c (_vdiprintf_r, vdiprintf): Ditto.
        * libc/stdio/vprintf.c (viprintf, _viprintf_r): Ditto.
        * libc/stdio/vscanf.c (viscanf, _viscanf_r): Ditto.
        * libc/stdio/vsnprintf.c (vsniprintf, _vsniprintf_r): Ditto.
        * libc/stdio/vsprintf.c (vsiprintf, _vsiprintf_r): Ditto.
        * libc/stdio/vsscanf.c (vsiscanf, _vsiscanf_r): Ditto.
        * libc/stdio/nano-vfprintf.c: New file.
        * libc/stdio/nano-vfprintf_float.c: New file.
        * libc/stdio/nano-vfprintf_i.c: New file.
        * libc/stdio/nano-vfprintf_local.h: New file.
        * libc/stdio/nano-vfscanf.c: New file.
        * libc/stdio/nano-vfscanf_float.c: New file.
        * libc/stdio/nano-vfscanf_i.c: New file.
        * libc/stdio/nano-vfscanf_local.h: New file.
2014-07-04 17:21:45 +00:00
Corinna Vinschen fcef025b94 * fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Add debug
output.
2014-07-03 16:48:21 +00:00
Corinna Vinschen 28fad4ee1b * legal.xml: Fix copyright. 2014-06-26 13:14:50 +00:00
Corinna Vinschen 7e10b64973 * errno.cc (errmap): Fix order of SERVICE_REQUEST_TIMEOUT. 2014-06-25 10:01:58 +00:00
Corinna Vinschen 9b9fb0042f * errno.cc (errmap): Handle Windows error codes ERROR_CANCELLED,
ERROR_CONNECTION_REFUSED, ERROR_DEV_NOT_EXIST, ERROR_DS_GENERIC_ERROR,
	ERROR_NOT_ENOUGH_QUOTA, ERROR_SERVICE_REQUEST_TIMEOUT, ERROR_TIMEOUT,
	ERROR_UNEXP_NET_ERR.
	* ldap.cc (cyg_ldap::map_ldaperr_to_errno): Drop explicit LDAP_TIMEOUT
	handling.
2014-06-25 09:59:38 +00:00
Corinna Vinschen 37b1464588 * ldap.cc (cyg_ldap::map_ldaperr_to_errno): Explicitely map LDAP_TIMEOUT
to EIO.
2014-06-25 09:28:12 +00:00
Corinna Vinschen e35b92c202 * autoload.cc (ldap_search_sW): Replace ldap_search_stW.
(LdapMapErrorToWin32): Import.
	* fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Accommodate
	change to cyg_ldap::open.
	* ldap.cc (CYG_LDAP_TIMEOUT): Remove.
	(CYG_LDAP_ENUM_TIMEOUT): Remove.
	(def_tv): Remove.
	(enum_tv): Remove.
	(cyg_ldap::map_ldaperr_to_errno): New method to map LDAP error codes to
	POSIX errno codes.  Explicitly map LDAP_NO_RESULTS_RETURNED to ENMFILE.
	(cyg_ldap::wait): Ditto.
	(struct cyg_ldap_init): New struct.
	(cyg_ldap::connect_ssl): Return ULONG.  Drop setting LDAP_OPT_TIMELIMIT.
	Add call to ldap_search_sW to fetch root DSE.
	(cyg_ldap::connect_non_ssl): Ditto.
	(ldap_init_thr): New static thread function.
	(cyg_ldap::connect): New method to call connect_ssl/connect_non_ssl in
	an interruptible cygthread.
	(struct cyg_ldap_search): New struct.
	(cyg_ldap::search_s): New method to perform generic synchronous search.
	(ldap_search_thr): New static thread function.
	(cyg_ldap::search): New method to call search_s in an interruptible
	cygthread.
	(struct cyg_ldap_next_page): New struct.
	(cyg_ldap::next_page_s): New method to perform generic synchronous
	paged search.
	(ldap_next_page_thr): New static thread function.
	(cyg_ldap::next_page): New method to call next_page_s in an
	interruptible cygthread.
	(cyg_ldap::open): Return POSIX errno.  Call connect method.
	(cyg_ldap::fetch_ad_account): Call search method rather than
	ldap_search_stW.
	(cyg_ldap::enumerate_ad_accounts): Return POSIX errno.  Use infinite
	timeout in call to ldap_search_init_pageW.
	(cyg_ldap::next_account): Return POSIX errno.  Call next_page method
	rather than ldap_get_next_page_s.
	(cyg_ldap::fetch_posix_offset_for_domain): Call search method rather
	than ldap_search_stW.
	(cyg_ldap::fetch_unix_sid_from_ad): Ditto.
	(cyg_ldap::fetch_unix_name_from_rfc2307): Ditto.
	* ldap.h (class cyg_ldap): Accommodate aforementioned changes.
	* passwd.cc (pg_ent::enumerate_ad): Ditto.  Break search if one of
	cyg_ldap::enumerate_ad_accounts or cldap.next_account returns with
	an error code other than ENMFILE.
	* sec_helper.cc (cygpsid::get_id): Accommodate change to cyg_ldap::open.
	* uinfo.cc (fetch_posix_offset): Ditto.
2014-06-25 09:10:50 +00:00
Corinna Vinschen 4491d189ae * libc/argz/envz_merge.c (envz_merge): Fix memory leak (Cygwin Coverity
Scan CID 60023).
	* libc/ctype/iswalpha.c (iswalpha): Add bounds check to avoid
	out-of-bounds read from utf8 tables (CID 59949).
	* libc/locale/ldpart.c (__part_load_locale): Add 1 byte to size of lbuf.
	Write NUL into the last byte to accommodate split_lines (CID 60047).
2014-06-23 20:21:54 +00:00
Corinna Vinschen 8431e478d2 * spawn.cc (find_exec): Initialize err (CID 60111).
* strace.cc (strace::activate): Fix potential buffer overrun (CID 59938)
	* syscalls.cc (popen): Close parent pipe descriptor via fclosing fp on
	error to avoid resource leak (CID 59981).
	* thread.cc (pthread::exit): Avoid accessing cygtls member after
	deleting "this" (CID 60217).
2014-06-23 19:05:15 +00:00
Corinna Vinschen cf06a0b18c * bsd_helper.cc (ipcexit_creat_hookthread): Delete shs in another error
case to make Coverity really happy (CID 59993).
2014-06-23 15:13:12 +00:00
Corinna Vinschen f739fd3ef0 * select.cc (start_thread_socket): Delete si on early return in case of
an error (CID 59967).
2014-06-23 14:56:45 +00:00
Corinna Vinschen 565e3643dd * regex/regcomp.c (computematchjumps): Free local memory in case of
error (CID 59975).
2014-06-23 14:33:55 +00:00
Corinna Vinschen f83cc3b7e9 * mount.cc (fs_info::update): Define dir in the outermost scope to avoid
accessing out-of-scope value (CID 60027).  Always initialize attr to
	upath (CID 60113).
2014-06-23 14:05:16 +00:00
Corinna Vinschen 6950fc18e3 * malloc_wrapper.cc (mallinfo): Initialize m if external malloc is used,
too (CID 60120).
2014-06-23 13:45:49 +00:00
Corinna Vinschen 28b4c8483e * localtime.cc (tzload): Fix leaking memory (CID 60001). 2014-06-23 13:38:06 +00:00
Corinna Vinschen 4337e28e62 * exceptions.cc (try_to_debug): Free environment pointer when not used
anymore (CID 59968).
2014-06-23 13:23:14 +00:00
Corinna Vinschen 4ea38ac7ef * net.cc (cygwin_getaddrinfo): Fix value of hint->ai_addrlen on 64 bit.
Explain why.
2014-06-23 12:35:31 +00:00
Corinna Vinschen 9c54570beb * environ.cc (regopt): Allocate small local buffer to avoid copying
twice.  Fixes resource leak (CID 60012).  Add comment.
2014-06-23 11:43:33 +00:00
Corinna Vinschen 686f560ece * dll_init.cc (dll_list::alloc): Fix buffer overrun (CID 59940). 2014-06-23 10:52:44 +00:00
Corinna Vinschen a1fd4b1a03 * dcrt0.cc (insert_file): Fix resource leaks (CIDs 59987, 59988). 2014-06-23 10:18:26 +00:00
Corinna Vinschen efaf85c5e6 * client.cc: Throughout, fix debug output of signed byte count value. 2014-06-23 09:17:24 +00:00
Corinna Vinschen 852ed641ee * ldap.cc (CYG_LDAP_TIMEOUT): Set to 5 secs.
(CYG_LDAP_ENUM_TIMEOUT): New timeout value for enumeration only.  Set
	to 60 secs.
	(CYG_LDAP_ENUM_PAGESIZE): Define as number of entries per single
	search page.  Set to 100.  Use throughout.
	(def_tv): Rename from tv.  Use throughout.
	(enum_tv): New variable.  Use in call to ldap_get_next_page_s.
2014-06-23 09:09:54 +00:00
Corinna Vinschen b1c17593f8 * ldap.cc (CYG_LDAP_TIMEOUT): Define as timeout value. Set to 30 secs
for now.  Use throughout.
	* uinfo.cc (colon_to_semicolon): New local function.
	(pwdgrp::fetch_account_from_windows): Convert all colons in AD gecos
	entry to commas.
2014-06-18 17:41:52 +00:00
Christopher Faylor 59c45c4445 * faq-programming.xml: Add gettext-devel to list of packages needed to build
Cygwin.
2014-06-17 14:49:06 +00:00
Corinna Vinschen 5b5c45752e Fix timestamp 2014-06-17 13:13:06 +00:00
Corinna Vinschen 451f0f45ee * libc/rexec.cc (cygwin_rexec): Make ahostbuf static to avoid returning
an out-of-scope address.
2014-06-17 08:46:59 +00:00
Corinna Vinschen 1f4923ae73 * passwd.c (main): Fix typo in error output. 2014-06-16 13:27:08 +00:00
Corinna Vinschen d510072c83 * fhandler_socket.cc (fhandler_socket::evaluate_events): Call
WSASetLastError after setsockopt.  Explain why.
2014-06-16 13:01:40 +00:00
Corinna Vinschen 6681d11fd3 * grp.cc (getgrouplist): Fix setting ngroups to make sure to return
the right value.
2014-06-16 09:12:29 +00:00
DJ Delorie 84600df21d merge from gcc 2014-06-11 17:56:17 +00:00
Richard Earnshaw deda48a9fb * libc/machine/aarch64/strchrnul.S: New file.
* libc/machine/aarch64/strchrnul-stub.c: New file.
	* libc/machine/aarch64/Makefile.am: Add them to build list.
	* libc/machine/aarch64/Makefile.in: Regenerated.
2014-06-11 10:42:54 +00:00
Richard Earnshaw 5efd066df2 * libc/machine/aarch64/strchr.S: New file
* libc/machine/aarch64/strchr-stub.c: New file
	* libc/machine/aarch64/Makefile.am: Add them to build list.
	* libc/machine/aarch64/Makefile.in: Regenerated.
2014-06-10 14:04:31 +00:00
DJ Delorie d043b4c527 * configure.host (default_newlib_nano_malloc): New.
(msp430): Set it.
* configure.in (newlib_nano_malloc): Leave unset if not set by
the user.
* configure: Regenerate.
* libc/configure.in (NEWLIB_NANO_MALLOC): Set after running
configure.host.
(newlib_nano_malloc): Leave unset if not set by	the user.
* libc/configure: Regenerate.
2014-06-10 03:09:35 +00:00
Christopher Faylor 4d79de90e1 * timer.cc (timer_tracker::cancel): Demote api_fatal to system_printf, printing
more details about odd failure condition.
2014-06-05 19:50:24 +00:00
Corinna Vinschen f9f90410fd * autoload.cc (ldap_memfreeW): Remove.
(ldap_msgfree): Import.
	* ldap.cc: Throughout, use ldap_msgfree to free LDAPMessage memory,
	rather than ldap_memfreeW.
	(cyg_ldap::next_account): Immediately abandon search when quiting from
	search.
2014-05-23 10:29:11 +00:00
Corinna Vinschen 448c1d284b *** empty log message *** 2014-05-23 07:15:30 +00:00
Corinna Vinschen 449429c16a * autoload.cc (ldap_abandon): Remove.
(ldap_count_entries): Import.
	(ldap_get_next_page_s): Import.
	(ldap_result): Remove.
	(ldap_searchW): Remove.
	(ldap_search_abandon_page): Import.
	(ldap_search_init_pageW): Import.
	* ldap.cc (cyg_ldap::close): Use ldap_search_abandon_page to abandon
	search.  Reset srch_id, srch_msg and srch_entry.
	(cyg_ldap::enumerate_ad_accounts): Use paged search to overcome server
	side search result set restriction.
	(cyg_ldap::next_account): Ditto.
	* ldap.h (class cyg_ldap): Add members srch_id, srch_msg and srch_entry.
	Remove member msg_id.
	(cyg_ldap::cyg_ldap): Change initialization accordingly.
2014-05-22 20:07:25 +00:00
Corinna Vinschen de13ccea73 * sec_auth.cc (get_server_groups): Call get_user_local_groups only if
get_logon_server succeeded.
2014-05-22 16:40:13 +00:00
DJ Delorie ee9b1ceb2d merge from gcc 2014-05-22 15:01:34 +00:00
Corinna Vinschen 03e3cf9846 * ldap.cc (cyg_ldap::fetch_ad_account): Take additional domain string
parameter.  Convert into likely rootDSE string if not NULL, and use in
	subsequent call to ldap_search_stW.  Add comment to explain that this
	is not the exactly correct solution.
	* ldap.h (cyg_ldap::fetch_ad_account): Change prototype accordingly.
	* uinfo.cc (pwdgrp::fetch_account_from_windows): Always use loc_ldap
	in call to fetch_posix_offset to make sure we're fetchoinmg the posix
	offsets from *our* domain controller.  Only set domain variable to
	non-NULL if the account is from a trusted domain.  Use domain in call
	to cyg_ldap::fetch_ad_account.
2014-05-22 14:50:24 +00:00
Corinna Vinschen ece6c8e383 * gmon.h: Pull in profile.h. Explain why. 2014-05-22 10:25:45 +00:00
Corinna Vinschen 81f9ce0734 * uinfo.cc (pwdgrp::fetch_account_from_windows): Fix potential SEGV
referencing NULL pointer.
2014-05-22 09:47:23 +00:00
Corinna Vinschen ed2cfab440 * libc/bsdlib.cc (forkpty): Close master and slave if fork fails to
avoid resource leak (CID 59997).
	* libc/fts.c: Update to FreeBSD version 1.39 (CID 59947).
	* libc/minires.c (minires_get_search): Fix out-of-bounds read from
	words array (CID 59937).
2014-05-22 09:45:17 +00:00
Corinna Vinschen 59ce289027 * flock.cc (delete_lock_in_parent): Use LIST_FOREACH_SAFE to avoid
dereferencing freed pointer (CID 60224).
2014-05-20 14:54:06 +00:00