Commit Graph

6405 Commits

Author SHA1 Message Date
Corinna Vinschen 9f3e3df961 * mmap.cc (MapView9x): Note possible uselessness of retrying.
(MapViewNT): Ditto.
	(mmap64): Fix pre-reservation to work for non NULL, non MAP_FIXED.
2007-01-17 10:49:24 +00:00
Corinna Vinschen cbe2437b28 * autoload.cc (RtlAnsiStringToUnicodeString): Define.
(RtlOemStringToUnicodeString): Define.
	* ntdll.h (struct _RTL_USER_PROCESS_PARAMETERS): Define.
	(struct _PEB): Redefine with a bit of content.
	(RtlAnsiStringToUnicodeString): Declare.
	(RtlOemStringToUnicodeString): Declare.
	* path.cc: Include ntdll.h.
	(_upp): New global variable pointing to user process parameter block.
	(get_user_proc_parms): New static function to retrieve user process
	parameter block.
	(close_user_proc_parms_cwd_handle): New function to close handle to
	current working directory in user process parameter block.
	(cwdstuff::init): Drop redundant declaration of dynamically_loaded.
	Set current dir only on 9x.  Call close_user_proc_parms_cwd_handle
	on NT instead.
	(cwdstuff::keep_in_sync): Only on 9x.
	(cwdstuff::set): Keep behaviour on 9x.  On NT write cwd path into user
	process parameter block and set cwd handle to NULL.  Fix comments to
	reflect new behaviour.
2007-01-16 18:01:06 +00:00
Corinna Vinschen 835fc32a3a * fhandler_socket.cc (fhandler_socket::ioctl): Handle SIOCGIFINDEX.
* net.cc (get_2k_ifconf): Ditto.
	(get_nt_ifconf): Fake SIOCGIFINDEX.
	(get_95_ifconf): Ditto.
	(get_ifconf): Handle SIOCGIFINDEX.  Fake it for loopback on systems
	not supporting IP Helper Lib.
	* include/asm/socket.h (SIOCGIFINDEX): Define.
	* include/cygwin/if.h (struct ifreq): Add member for interface index.
	(ifr_ifindex): Define.
2007-01-16 12:01:36 +00:00
Corinna Vinschen 2fd167e6de * include/cygwin/in6.h (struct ipv6_mreq): Change type of interface
member to uint32_t.
	(struct in6_pktinfo): Ditto.
2007-01-16 11:41:55 +00:00
Corinna Vinschen 6281771f37 * include/cygwin/in.h (struct ip_mreq_source): Define.
(struct ip_msfilter): Define.
	(IP_MSFILTER_SIZE): Define.
	(struct in_pktinfo): Define.
	(struct group_req): Define.
	(struct group_source_req): Define.
	(struct group_filter): Define.
	(GROUP_FILTER_SIZE): Define.
	(INADDR_ALLRTRS_GROUP): Define.
	* include/cygwin/socket.h: Define protocol agnostic multicast options.
2007-01-16 11:37:05 +00:00
Corinna Vinschen 153995f846 * CYGWIN_LICENSE: Fix web pages and contact information. 2007-01-15 12:19:01 +00:00
Corinna Vinschen 362359bd10 * ntdll.h: Adjust status definitions. 2007-01-15 11:11:37 +00:00
Corinna Vinschen 5d93eb069e * cygheap.cc (cygheap_init): Add TODO comment. 2007-01-15 11:01:23 +00:00
Corinna Vinschen 5d1dd9308d * ntdll.h (STATUS_SHARING_VIOLATION): Define. 2007-01-15 10:52:15 +00:00
Corinna Vinschen a0638e5e67 * syscalls.cc (unlink_nt): Don't move files to recycle bin which are
not in use.
2007-01-13 20:56:01 +00:00
Christopher Faylor b3f40a5fd0 * glob.cc: Update copyright notice with latest from FreeBSD.
(glob0): Use correct type for c variable to propagate previously detected
protection.
2007-01-13 07:10:14 +00:00
Corinna Vinschen f51b396579 * cygheap.cc (_csbrk): Fix off-by-one error.
* cygwin.sc: Give .cygheap a minimum size of 512K.
2007-01-12 19:40:20 +00:00
Christopher Faylor 5f77729c30 * external.cc (sync_winenv): Use cur_environ () rather than __cygwin_environ. 2007-01-12 15:40:13 +00:00
Corinna Vinschen 0b7c56a5f5 * fork.cc (child_copy): Add missing Windows PID in debug output. 2007-01-12 15:26:02 +00:00
Corinna Vinschen ee4370fd29 * syscalls.cc: Update copyright. 2007-01-12 14:16:42 +00:00
Danny Smith 9a08dde11a 2007-01-11 Gisle Vanem <giva@users.sourceforge.net>
* include/winbase.h (struct _OVERLAPPED): Change type of
	Internal, InternalHigh members to ULONG_PTR.
	(PAPCFUNC): Change DWORD parameter to ULONG_PTR.
	(CreateIoCompletionPort): Likewise.
	(PostQueuedCompletionStatus): Likewise.
	(QueueUserAPC): Likewise.
	(GetQueuedCompletionStatus): Change PDWORD parm to PULONG_PTR.
2007-01-11 07:11:39 +00:00
Corinna Vinschen 3452cdd3c5 * mmap.cc (mmap64): Pre-Reserve space for the whole mapping to get a
useful, valid address before the actual mappings take place.
	Fix typo in comment.
2007-01-10 09:30:38 +00:00
Corinna Vinschen ac924d61de * syscalls.cc (sync): Use b_drive for B: drive (Thanks to Howard Chu). 2007-01-10 09:06:20 +00:00
Corinna Vinschen 1656b94637 * syscalls.cc (getpagesize): Change condition for clarity.
(getsystempagesize): Ditto.
2007-01-09 15:46:41 +00:00
Corinna Vinschen ca9029913a * cygpath.cc (usage): Add -O and -F, remove tabs.
(get_special_folder): New function.
	(get_user_folder): New function.
	(dowin): Add -O and -F, better -D, -P error handling.
	(main): Add -O and -F.
	* utils.sgml (cygpath): Document -O and -F.
2007-01-09 12:17:05 +00:00
Corinna Vinschen d5b45d2f38 * mmap.cc: Do bookkeeping in 4K pages, rather than in 64K chunks. 2007-01-09 11:18:57 +00:00
Danny Smith 1e848f5e32 2007-02-06 Pierre A. Humblet <Pierre.Humblet@ieee.org>
* windns.h (DNS_TYPE_RP, DNS_TYPE_AFSDB, DNS_TYPE_X25,
	DNS_TYPE_ISDN, DNS_TYPE_RT, DNS_TYPE_NSAP, DNS_TYPE_NSAPPTR,
	DNS_TYPE_SIG, DNS_TYPE_KEY, DNS_TYPE_PX, DNS_TYPE_GPOS,
	DNS_TYPE_AAAA, DNS_TYPE_LOC, DNS_TYPE_NXT, DNS_TYPE_EID,
	DNS_TYPE_NIMLOC, DNS_TYPE_SRV, DNS_TYPE_ATMA, DNS_TYPE_NAPTR,
	DNS_TYPE_KX, DNS_TYPE_CERT, DNS_TYPE_A6, DNS_TYPE_DNAME,
	DNS_TYPE_SINK, DNS_TYPE_OPT, DNS_TYPE_UINFO, DNS_TYPE_UID,
	DNS_TYPE_GID, DNS_TYPE_UNSPEC, DNS_TYPE_ADDRS, DNS_TYPE_TKEY,
	DNS_TYPE_TSIG, DNS_TYPE_IXFR, DNS_TYPE_AXFR, DNS_TYPE_MAILB,
	DNS_TYPE_MAILA, DNS_TYPE_ALL, DNS_TYPE_ANY): Add enum values.
2007-01-08 08:09:15 +00:00
Corinna Vinschen 6bcc8fd7b1 * security.h (setacl): Add parameter for writability flag.
* sec_acl.cc (setacl): Ditto.  Set to true if any ACE with write
	permissions is created.
	* fhandler_disk_file.cc (fhandler_disk_file::facl): Reset
	FILE_ATTRIBUTE_READONLY if ACL contains an ACE with write permissions.
2007-01-07 12:44:10 +00:00
Corinna Vinschen 7ce031f211 * include/strings.h: Don't include string.h. Only declare functions
according to SUSv3.
2007-01-05 15:09:22 +00:00
Corinna Vinschen 0a9e977f62 (get_ifconf): Set MTU for loopback to more correct value. 2007-01-04 10:48:57 +00:00
Corinna Vinschen bcdf742178 * fhandler_socket.cc (fhandler_socket::ioctl): Don't fake results
for SIOCGIFFLAGS here.  Call get_ifconf instead.
	* net.cc (get_2k_ifconf): Clean up code to generate interface name.
	Handle SIOCGIFFLAGS here.
	(get_nt_ifconf): Fake SIOCGIFFLAGS here.
	(get_95_ifconf): Ditto.
	(get_ifconf): Don't fake loopback on systems with IP Helper Lib.
	Set MTU for loopback to a more "modern" value.
2007-01-04 10:11:27 +00:00
Corinna Vinschen 7bef7db5cc * fhandler.h (PREFERRED_IO_BLKSIZE): Define as 64K.
* fhandler.cc (fhandler_base::fstat): Set st_blksize to
	PREFERRED_IO_BLKSIZE.
	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Ditto.
	* fhandler_mailslot.cc (fhandler_mailslot::fstat): Ditto.
	* fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto.
2007-01-04 09:17:55 +00:00
Corinna Vinschen 960725d6ed * ChangeLog: Happy New Year.
* ChangeLog-2006: Move 2006 changelogs here.
	* spawn.cc: Bump copyright.
2007-01-03 11:14:53 +00:00
Christopher Faylor e734fdcae9 * spawn.cc (spawn_guts): Don't expect synchronization from a non-cygwin
_P_NOWAIT process.
2007-01-01 19:37:19 +00:00
Keith Marshall 724dbeea36 * include/libgen.h: New file; required by...
* mingwex/basename.c, mingwex/dirname.c: New files.
* mingwex/Makefile.in (DISTFILES): Add them...
(POSIX_OBJS): ...with corresponding basename.o, dirname.o
(Dependencies): Typo; s/Dependancies/Dependencies/
2006-12-31 18:03:33 +00:00
Corinna Vinschen 65c3750e65 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Improve debug
output.
2006-12-21 10:59:47 +00:00
Corinna Vinschen f2af71ea96 * dumper.cc: Include ansidecl.h before including bfd.h to woraround
a problem with the order in which system include files are included.
2006-12-21 09:59:04 +00:00
Corinna Vinschen 97b09fe1c5 Partially revert change from 2006-10-22. GetSecurityInfo messes up
user information on NT4.
	* sec_helper.cc (security_descriptor::malloc): Drop LocalAlloc
	considerations.
	(security_descriptor::realloc): Ditto.
	(security_descriptor::free): Ditto.
	* security.cc (get_reg_security): Reinstantiate.
	(get_nt_object_security): Revert to using NtQuerySecurityObject.
	* security.h (class security_descriptor): Drop type member.
	Accommodate throughout.
	(security_descriptor::size): Constify.
	(security_descriptor::copy): Ditto.
2006-12-20 17:14:23 +00:00
Christopher Faylor e09c8fde55 * pinfo.cc (set_myself): Use a more foolproof method for determining if the
current process was started from another cygiwn process.
2006-12-18 21:28:31 +00:00
Corinna Vinschen c21efb9a85 * libc/minires-os-if.c (cygwin_query): Remove ERROR_PROC_NOT_FOUND case.
(get_dns_info): Verify DnsQuery exists. Use autoloaded GetNetworkParams.
2006-12-15 09:50:32 +00:00
Corinna Vinschen 1fd82398bb * winsup.h (clear_procimptoken): Close hProcImpToken in a safer way. 2006-12-13 11:18:39 +00:00
Corinna Vinschen 56face1741 * security.cc (lsaauth): Initialize lsa to INVALID_HANDLE_VALUE to
avoid potential access violation.
2006-12-13 09:53:42 +00:00
Corinna Vinschen 524e6a5ad9 * Makefile.in (subauth): Drop rule.
* configure.in: Remove subauth related check.
	* configure: Regenerate.
2006-12-12 20:26:27 +00:00
Corinna Vinschen 67f85328b2 Remove subauth directory. 2006-12-12 19:22:07 +00:00
Corinna Vinschen 26684e48d2 * environ.cc (subauth_id_init): Remove.
(parse_thing): Drop "subauth_id" option.
	* security.cc (get_token_group_sidlist): Drop comments concerning
	subauthentication.
	(create_token): Back out subauthentication related changes.
	(subauth): Remove.
	* security.h (create_token): Remove declaration.
	(subauth): Ditto.
	* syscalls.cc (seteuid32): Drop subauthentication handling entirely.
2006-12-12 19:18:56 +00:00
Corinna Vinschen 31fdd91f9b * cygwinenv.sgml: Drop description of "traverse" option. 2006-12-12 18:48:35 +00:00
Corinna Vinschen a889232410 * environ.cc (set_traverse): Remove.
(parse_thing): Drop "traverse" option.
	* path.cc (fs_info::update): Don't request SE_CHANGE_NOTIFY_PRIV
	privilege.
	* sec_helper.cc (set_cygwin_privileges): Ditto.
	* security.cc (allow_traverse): Remove.
	(alloc_sd): Drop special allow_traverse code.
	* security.h (allow_traverse): Drop declaration.
	* syscalls.cc (statvfs): Don't request SE_CHANGE_NOTIFY_PRIV privilege.
2006-12-12 18:47:25 +00:00
Corinna Vinschen 5684cfebba Partially revert change from 2005-04-03, always running under an
impersonation token, which collides with Vista UAC.
	* cygheap.h (deimpersonate): revert to self instead of impersonating
	hProcImpToken.
	(reimpersonate): Only impersonate if setuid.
	* dcrt0.cc (dll_crt0_0): Don't initialize hProcImpToken here.
	(dll_crt0_1): Set privileges on hProcToken.
	* fork.cc (frok::child): Set privileges on hProcToken.  Close handle to
	hProcImpToken.
	* grp.cc (internal_getgroups): Use hProcToken instead of hProcImpToken.
	* security.cc (check_access): Create hProcImpToken on demand here.
	* security.h (set_process_privilege): Set privileges on hProcToken.
	(_push_thread_privilege): Use hProcToken instead of hProcImpToken.
	(pop_thread_privilege): If not setuid'ed, revert to self.
	* syscalls.cc (setegid32): Drop setting primary group on hProcImpToken.
	Close handle to hProcImpToken.
	* uinfo.cc (internal_getlogin): Ditto.
	* winsup.h (clear_procimptoken): New inline function.
2006-12-12 16:27:32 +00:00
Christopher Faylor 815122d842 Add missing ChangeLog. 2006-12-12 15:59:26 +00:00
Christopher Faylor a10c6f0312 * sigproc.cc (child_info::child_info): Initialize msv_count. 2006-12-12 15:58:08 +00:00
Corinna Vinschen 46b51548b1 Revert erroneous checkin. 2006-12-12 15:10:56 +00:00
Corinna Vinschen d6a6da338b * libc/minires.c (res_ninit): Drop handling for LOCALDOMAIN environment
variable.
2006-12-12 08:29:37 +00:00
Corinna Vinschen 0c365c631f * Makefile.in (DLL_OFILES): Add minires-os-if.o and minires.o.
(SUBLIBS): Add libresolv.a.
	Add rule for libresolv.a.
	* autoload.cc: Fix return code handling for IP Helper API in case
	of being unable to load iphlpapi.dll.
	(DnsQuery_A): Define.
	(DnsRecordListFree): Define.
	* cygwin.din: Export resolver functions.
	* include/resolv.h: New header.
	* include/arpa/nameser.h: New header.
	* include/arpa/nameser_compat.h: New header.
	* include/cygwin/version.h: Bump API minor number.
	* libc/minires-os-if.c: New file.
	* libc/minires.c: New file.
	* libc/minires.h: New file.
2006-12-11 19:59:06 +00:00
Christopher Faylor 7dfad3a0c6 * sigproc.cc (child_info::child_info): Move old comment about msv_count here.
Edit it slightly to reflect new sensibilities.
2006-12-11 19:17:20 +00:00
Christopher Faylor 6dcb2ec441 * dumper.cc: Add an include to accommodate new include/elf usage. 2006-12-11 19:17:17 +00:00
Christopher Faylor fc32d70841 correct email address 2006-12-11 18:58:40 +00:00
Christopher Faylor c16548b2a2 * child_info.h (child_info_spawn::__stdin): New element.
(child_info_spawn::__stdin): Ditto.
(CURR_CHILD_INFO_MAGIC): Regenerate.
* dcrt0.cc (check_sanity_and_sync): Minor cleanup.
(child_info_spawn::handle_spawn): Handle new __std* elements by calling
move_fd.
* dtable.cc (dtable::move_fd): Define new function.
* dtable.h (dtable::move_fd): Declare new function.
* fhandler.h (fhandler_pipe::popen_pid): Declare new element.
* fhandler.h (fhandler_pipe::get_popen_pid): Define new function.
* fhandler.h (fhandler_pipe::set_popen_pid): Ditto.
* pipe.cc (fhandler_pipe::fhandler_pipe): Zero popen_pid.
(fhandler_pipe::dup): Ditto.
* spawn.cc (handle): Change second argument to bool.
(spawn_guts): Accept __stdin/__stdout arguments and set them appropriately in
child_info structure and in STARTUPINFO structure.
* syscalls.cc (popen): New cygwin-specific implementation using spawn.
(pclose): Ditto.
* winsup.h (spawn_guts): Accommodate new arguments for spawn_guts.
* fhandler.cc (fhandler_base::set_no_inheritance): Make second arg a bool.
* fhandler.h (fhandler_base::set_no_inheritance): Ditto for declaration.
* child_info.h (child_info::msv_count): Rename from the now-inappropriate
"zero".
(child_info_spawn::filler): Add filler to work around Vista bug.
(child_info_fork::filler): Ditto.
* dcrt0.cc (get_cygwin_startup_info): Remove "zero" check since it is now
always filled out.
* fork.cc (frok::parent): Move ch.zero manipulation to constructor.
* spawn.cc (spawn_guts): Ditto.  Remove _ch wrapper.
* sigproc.cc (child_info::child_info): Initialize starter[].
* shared.cc (shared_info::heap_slop_size): Remove noisy system_printfs.
* shared_info.h (CURR_SHARED_MAGIC): Regenerate.
2006-12-11 18:55:29 +00:00
Corinna Vinschen e79c01f84e * fhandler.cc (rootdir): Fix typo in comment.
* syscalls.cc (try_to_bin): Ditto.
2006-12-11 09:07:22 +00:00
Christopher Faylor c2b8862303 * mount.cc (do_mount): Avoid unnecessary cygwin_conv_to_win32_path and pass
POSIX path directly - this avoids a cygwin DLL warning.
2006-12-10 21:50:06 +00:00
Corinna Vinschen cbfb7b1b23 * autoload.cc (SHFileOperationA): Drop definition.
* ntdll.h (struct _FILE_RENAME_INFORMATION): Define.
	* path.cc (fs_info::update): Note length of rootdir prefix in
	root_len.
	(get_nt_native_path): New function, taking over functionality of
	path_conv::get_nt_native_path.
	(path_conv::get_nt_native_path): Just call get_nt_native_path.
	* path.h (get_nt_native_path): Declare.
	(struct fs_info): New member root_len.
	(fs_info::length): New inline method returning root_len.
	(path_conv::rootdir): New inline method returning rootdir prefix.
	* syscalls.cc (try_to_bin): Rewrite using only system calls.
	(unlink_nt): Call try_to_bin with additional handle to open file
	parameter.
	(statvfs): Use path_conv::rootdir method.
	* wincap.h: Define has_recycle_dot_bin throughout.
	* wincap.cc: Ditto.
2006-12-10 16:43:30 +00:00
Corinna Vinschen 6c64fb2fda * fhandler.cc (rootdir): Clarify comment. 2006-12-10 16:20:43 +00:00
Corinna Vinschen 37ae69e8b1 * fhandler.cc (rootdir): Don't look for volume mount points on remote
shares.
2006-12-10 16:18:51 +00:00
Corinna Vinschen 30cf835f7e * fhandler.cc (rootdir): Drop useless post-increment. Take volume
mount points into account.
	(check_posix_perm): Allocate space for root directory big enough.
2006-12-10 12:56:50 +00:00
Corinna Vinschen 8af19fdb25 * syscalls.cc (try_to_bin): Add comment that this is not possibly
the final version.
2006-12-09 09:29:47 +00:00
Corinna Vinschen e563a4d5b8 * syscalls.cc (unlink_nt): Open native symlinks with
FILE_OPEN_REPARSE_POINT flag.
2006-12-07 17:53:05 +00:00
Corinna Vinschen 1c9b2968fa * ntdll.h (STATUS_DELETE_PENDING): Define.
(struct _FILE_DISPOSITION_INFORMATION): Define.
	* syscalls.cc (unlink_9x): new function to delete file on 9x.
	* syscalls.cc (unlink_nt): new function to delete file on NT.
	(unlink): Simplify.  Move OS dependent stuff into aforementioned
	functions.  Also handle FILE_ATTRIBUTE_HIDDEN as R/O-like flag.
2006-12-07 17:40:24 +00:00
Corinna Vinschen 398e28fbbc * autoload.cc (SHFileOperationA): Define.
* syscalls.cc (try_to_bin): New function trying to move a file to
	the recycle bin.
	(unlink): Fix arguments used in CreateFile for delete on close.
	Before closing the handle, try to move the file to the recycle bin.
2006-12-07 11:53:46 +00:00
Corinna Vinschen 2ffc166d07 * cygheap.h (struct cwdstuff): Add "sync" member and accompanying
"keep_in_sync" methods.
	* external.cc (cygwin_internal): Call above keep_in_sync method when
	CW_SYNC_WINENV is requested.
	* path.cc (cwdstuff::init): Don't change to windows_system_directory
	if keep_in_sync is requested.
	(cwdstuff::keep_in_sync): New method.
	(cwdstuff::set): Take sync flag into account.
2006-12-07 10:04:52 +00:00
Corinna Vinschen 63f33caadc * termios.cc: Change include order to accomodate change to sys/ioctl.h. 2006-12-06 19:44:07 +00:00
Corinna Vinschen 8b8273781b * fhandler_mem.cc (fhandler_dev_mem::open): Fix comment.
* wincap.cc (has_physical_mem_access): Reflect the fact that physical
	memory access has been made a protected operation beginning with
	2003 Server.
2006-12-06 16:33:03 +00:00
Corinna Vinschen bf8ea306ec * include/sys/ioctl.h: Pick up termios.h, for TIOCGWINSZ. 2006-12-06 14:08:08 +00:00
Corinna Vinschen 6acc178a24 * winsup.h (WINVER): Set to 0x0600 to cover Vista. 2006-12-06 14:06:38 +00:00
Corinna Vinschen ad7915ffca * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Fix typo. 2006-12-06 14:05:59 +00:00
Corinna Vinschen 3c788ea42a * path.cc (cwdstuff::init): Don't change to windows_system_directory
if Cygwin DLL has been loaded dynamically.
2006-12-05 21:46:26 +00:00
Corinna Vinschen 2156546df2 * path.cc (cwdstuff::set): Don't try to open directory on systems not
supporting that.
2006-12-05 13:20:38 +00:00
Corinna Vinschen a83c59fbc3 * dcrt0.cc (get_cygwin_startup_info): Fix comment.
* wincap.cc (wincapc::init): Always reset needs_count_in_si_lpres2 to
	false on non 64-bit systems.
2006-12-05 13:16:24 +00:00
Corinna Vinschen 301cd37dda Fix date. 2006-12-05 11:07:12 +00:00
Corinna Vinschen c6674b53d3 * dcrt0.cc (get_cygwin_startup_info): Change zeros to DWORD array.
Expect first DWORD in child_info struct being set to non-zero if
	wincap.needs_count_in_si_lpres2 is set.  Add comment to explain why.
	* fork.cc (frok::parent): Set ch.zero[0] to a sensible count value
	if wincap.needs_count_in_si_lpres2 is set.
	* spawn.cc (spawn_guts): Ditto.  Add filler bytes after ch on stack
	to accomodate needs_count_in_si_lpres2.
	* wincap.h: Define needs_count_in_si_lpres2 throughout.
	* wincap.cc: Ditto.
2006-12-05 10:59:21 +00:00
Corinna Vinschen 8eca536272 * dir.cc (mkdir): Check last path component for "..".
(rmdir): Don't check last path component for "..".
	* fhandler_disk_file.cc (fhandler_disk_file::rmdir): Drop kludge
	which tries to allow deleting the current working directory.
	* path.cc (has_dot_last_component): Add parameter to indicate testing
	for "..".  Take trailing slash into account.
	(symlink_info::posixify): Rely on cygheap->cwd.win32 having a
	useful value.
	(cwdstuff::init): Initialize cygheap->cwd with current working
	directory.  Change to windows_system_directory afterwards.
	(cwdstuff::set): Never call SetCurrentDirectory here.  Just check
	if changing into target directory would be allowed.  Add comment to
	explain why.
	* path.h (has_dot_last_component): Declare with second parameter.
	* pinfo.cc (pinfo::zap_cwd): Remove.
	(pinfo::exit): Drop call to zap_cwd.
	* pinfo.h (class pinfo): Remove declaration of zap_cwd.
	* spawn.cc (spawn_guts): Set current working directory for non-Cygwin
	child applications.  Drop call to zap_cwd.
2006-11-30 10:17:24 +00:00
Corinna Vinschen 75bb63452d * security.cc (create_token): Revert erroneous change to test
subauth_token for INVAILD_HANDLE_VALUE.
	* syscalls.cc (seteuid32): Set create_token's subauth_token parameter
	back to NULL.
2006-11-28 23:15:01 +00:00
Corinna Vinschen 902716e599 * fhandler.cc (fhandler_base::open): Fix previous patch to handle the
SYSTEM attribute as well.
2006-11-28 09:57:01 +00:00
Corinna Vinschen ef26cc9307 * fhandler.cc (fhandler_base::open): Fix handling of files with
HIDDEN attribute set.
2006-11-27 19:14:24 +00:00
Christopher Faylor f64b151f59 * include/cygwin/signal.h: Add __extension__ to various anonymous unions and
structs.  (thanks to V.Haisman)
2006-11-27 16:43:34 +00:00
Corinna Vinschen 8e4735df6c Initial release of the Cygwin LSA authentication package.
* ChangeLog: New file.
	* Makefile.in: Ditto.
	* aclocal.m4: Ditto.
	* configure.in: Ditto.
	* configure: Ditto. Generated from configure.in.
	* cyglsa-config: Ditto.
	* cyglsa.c: Ditto.
	* cyglsa.din: Ditto.
	* cyglsa64.dll: Ditto.
	* make-64bit-version-with-visual-c.bat: Ditto.
	* mslsa.def: Ditto.
2006-11-27 13:05:54 +00:00
Corinna Vinschen c6caaa3429 * Makefile.in: Add dependencies for lsaauth.
* configure.in: Disable building subauth.  Add building lsaauth.
	* configure: Regenerate.
2006-11-27 13:01:36 +00:00
Corinna Vinschen b825c587ba * cyglsa.h: New header file.
* environ.cc: Disable subauth settings.
	* grp.cc: Accomodate cygsidlist's count now being a method.
	* sec_helper.cc (SECURITY_MANDATORY_INTEGRITY_AUTHORITY): Remove.
	(mandatory_medium_integrity_sid): Remove.
	(mandatory_high_integrity_sid): Remove.
	(mandatory_system_integrity_sid): Remove.
	(fake_logon_sid): Add.
	(cygsid::get_sid): Add well_known parameter.  Set well_known_sid
	accordingly.
	(cygsid::getfromstr): Ditto.
	(cygsidlist::alloc_sids): Move here from security.cc.
	(cygsidlist::free_sids): Ditto.
	(cygsidlist::add): Move here from security.h.  Add well_known parameter.
	Set well_known_sid accordingly.  Don't allow duplicate SIDs.
	* security.cc: Include cyglsa.h and cygwin/version.h.  Throughout
	accomodate cygsidlist's count now being a method.  Throughout drop
	redundant "contains" tests.
	(get_user_local_groups): Add local groups as well known SIDs.
	(get_token_group_sidlist): Add well known groups as well known SIDs.
	(get_server_groups): Ditto.  Only call get_unix_group_sidlist after
	get_user_local_groups to maintain "well_known_sid" attribute.
	(get_initgroups_sidlist): Add well known groups as well known SIDs.
	(get_setgroups_sidlist): Add usersid and struct passwd parameter to
	allow calling get_server_groups from here.
	(get_system_priv_list): Make static.  Return size of TOKEN_PRIVILEGES
	structure.
	(get_priv_list): Ditto.
	(create_token): Accomodate above changes.  Drop misguided attempt to
	add MIC SIDs to created user token.  Print returned token as hex value.
	(subauth): Disable.
	(lsaauth): New function implementing client side of LSA authentication.
	* security.h (class cygsid): Add well_known_sid attribute.  Accomodate
	throughout.  Add *= operator to create a well known SID.
	(class cygsidlist): Rename count to cnt.  Make count a method.
	(cygsidlist::add): Move to sec_helper.cc.
	(cygsidlist::operator *=): New method to add well known SID.
	(cygsidlist::non_well_known_count): New method returning number of
	non well known SIDs in list.
	(cygsidlist::next_non_well_known_sid): New method returning next non
	well known SID by index.
	(mandatory_medium_integrity_sid): Drop declaration.
	(mandatory_high_integrity_sid): Drop declaration.
	(mandatory_system_integrity_sid): Drop declaration.
	(fake_logon_sid): Add declaration.
	(subauth): Disable declaration.
	(lsaauth): Add declaration.
	* syscalls.cc (seteuid32): Disable subauthentication.  Add LSA
	authentication.
	* wincap.h: Define needs_logon_sid_in_sid_list throughout.
	* wincap.cc: Ditto.
2006-11-27 12:59:59 +00:00
Keith Marshall b6bb405954 configure.in: Update to autoconf 2.5x syntax; fix macro argument quoting;
remove invalid use of AC_ALLOCA; remove redundant use of AC_SUBST.
2006-11-25 15:55:05 +00:00
Corinna Vinschen 124b187f16 * security.h (DBGSID): Define for debugging purposes.
(MKSID): Rename from SID so as to not hide SID definition from winnt.h.
	* sec_helper.cc: Change SID to MKSID throughout.
2006-11-23 16:44:55 +00:00
Corinna Vinschen 23f710014d * net.cc (get_ipv6_funcs): Fix formatting. 2006-11-23 16:30:12 +00:00
Corinna Vinschen 86404692c6 * path.cc (fs_info::update): Define GETVOLINFO_VALID_MASK and TEST_GVI.
Change FS_IS_SAMBA and FS_IS_SAMBA_WITH_QUOTA and their usage
	accordingly.  Define FS_IS_NETAPP_DATAONTAP.  Recognize NetApp device
	and store in is_netapp flag.  Mark NetApp device as having no good
	inodes.
	* path.h (struct fs_info): Add is_netapp flag.  Add matching accessors.
2006-11-23 11:28:52 +00:00
Corinna Vinschen bf4071fad0 * fhandler_console.cc (set_color): Avoid (again) inappropriate
intensity interchanging that used to render reverse output unreadable
	when (non-reversed) text is bright.
	See http://sourceware.org/bugzilla/show_bug.cgi?id=514
2006-11-23 10:08:04 +00:00
Corinna Vinschen 9e3f289f51 * devices.h: Add additional SCSI disk block device numbers per
http://www.kernel.org/pub/linux/docs/device-list/devices.txt
	up to 128 devices.
	* devices.in: Ditto.
	(device::parsedisk): Add additonal else-if cases for decoding base
	and drive indices.
	* devices.cc: Regenerate.
	* dtable.cc (build_fh_pc): Add additional DEV_SD{2..7}_MAJOR cases.
2006-11-23 09:55:55 +00:00
Danny Smith d22713e25d * Makefile.in: Add aclocal.m4 to source release. 2006-11-21 09:36:00 +00:00
Danny Smith 5f2d9e5fac * Makefile.in: Add aclocal.m4:to source release.
* mingwex/Makefile.in: Ditto.
	* profile/Makefile.in: Ditto.
2006-11-21 09:30:15 +00:00
Chris Sutcliffe a44ecdf5ae 2006-11-18 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/w32api.h: Increment version to 3.8.
        * Makefile.in: Ditto.
2006-11-18 22:39:52 +00:00
Chris Sutcliffe c6bf4f2a19 2006-11-18 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* Include/_mingw.h: Increment version to 3.11.
        * Makefile.in: Ditto.
2006-11-18 22:26:49 +00:00
Danny Smith 96da86f7e8 2006-11-13 Daniel Schlyder <thrug@users.sourceforge.net>
* include/winnt.h (VER_SUITE_EMBEDDEDNT, VER_SUITE_SINGLEUSERTS,
	VER_SUITE_STORAGE_SERVER, VER_SUITE_COMPUTE_SERVER): Define.

	* include/winuser.h (SM_STARTER, SM_SERVERR2): Define.
2006-11-13 02:11:45 +00:00
Corinna Vinschen c3a0492e16 * autoload.cc (EqualPrefixSid): Define.
* security.cc (create_token): Drop grps_buf.  Use alloca instead.
	Only add the MIC SID to the TOKEN_GROUPS list for the NtCreateToken
	call.  If the subauthentication token exists, use its MIC SID.
	Set SID Attributes for the MIC SID to 0.
2006-11-09 15:24:34 +00:00
Danny Smith cb505ee695 [ mingw-Bugs-1590623 ]
* include/_mingw.h (__CRT_INLINE): Use __gnu_inline__ attribute
	in C99 mode.
2006-11-08 21:58:18 +00:00
Corinna Vinschen 2fd2ddf3f5 * sec_helper.cc (sid_auth): Remove.
(well_known_this_org_sid): New well known sid.
	(SECURITY_MANDATORY_INTEGRITY_AUTHORITY): Define.
	(mandatory_medium_integrity_sid): New well known sid.
	(mandatory_high_integrity_sid): Ditto.
	(mandatory_system_integrity_sid): Ditto.
	(cygsid::get_sid): Use local SID_IDENTIFIER_AUTHORITY.  Allow all
	authorities fitting in a UCHAR.
	* security.cc (get_token_group_sidlist): Always add the local
	group to the token.  Add comment.  Add "This Organization" group
	if available in incoming group list.
	(get_server_groups): Only add world and authenticated users groups
	if not already in list.
	(create_token): Add matching mandatory integrity SID to group list
	on systems supporting Mandatory Integrity Control.
	* security.h (well_known_this_org_sid): Define.
	(mandatory_medium_integrity_sid): Define.
	(mandatory_high_integrity_sid): Define.
	(mandatory_system_integrity_sid): Define.
	* wincap.h: Define has_mandatory_integrity_control throughout.
	* wincap.cc: Ditto.
2006-11-08 11:38:05 +00:00
Corinna Vinschen 86bc8fadff * fhandler.cc (check_posix_perm): Moved here from syscalls.cc.
(fhandler_base::fpathconf): New method implementing (f)pathconf.
	* fhandler.h (class fhandler_base): Declare fpathconf method.
	* path.cc (path_conv::check): Replace MAX_LINK_DEPTH with SYMLOOP_MAX.
	* path.h (MAX_LINK_DEPTH): Delete.
	* syscalls.cc (check_posix_perm): Move to fhandler.cc.
	(fpathconf): Call fhandler's fpathconf method.
	(pathconf): Build fhandler and call fhandler's fpathconf method.
	* sysconf.cc (sysconf): Reorder switch according to order of flags
	in sys/unistd.h.  Add handling for some missing flags.
	* include/limits.h: Reorder according to SUSv3 description.  Add some
	missing definitions.  Add comments.
	* include/sys/syslimits.h: New file overriding newlib's syslimits.h
	file.
2006-11-07 17:59:54 +00:00
Corinna Vinschen cc9dbc905c * dtable.cc (build_fh_pc): Add missing DEV_SD1_MAJOR case (Thanks to
Joe Loh for noticing).
2006-11-06 13:46:24 +00:00
Corinna Vinschen 2228ff0267 * path.cc (symlink_info::posixify): Fix comment. 2006-11-02 13:39:44 +00:00
Corinna Vinschen 4521c4bd0c * path.cc (symlink_info::check): Eliminate PATH_REP bit from pflags. 2006-11-02 12:19:16 +00:00
Corinna Vinschen 5fc8f227dc * path.cc (symlink_info::posixify): New mothod converting NT and DOS
paths in symlinks to POSIX.
	(symlink_info::check_shortcut): Allocate buf allowing for a trailing 0.
	Call posixify on the result.
	(symlink_info::check_sysfile): Read from file into local buffer.
	Eliminate old b16 considerations.  Call posixify on the result.
	(symlink_info::check_reparse_point): Don't use PrintName but
	SubstituteName which is relevant for Windows' path handling.
	Call posixify on the result.
2006-11-02 11:45:03 +00:00
Danny Smith a45b9181ea * include/winuser.h (LR_DEFAULTSIZE): Remove duplicate.
C99 'extern inline' patrol.
	* include/winnt.h (GetCurrentFiber): Remove extern declaration.  Make
	inline static.
	(GetFiberData): Likewise.
	* lib/kernel32.c: Remove.
	* lib/Makefile.in: Remove reference to kernel32.[co].
2006-11-02 00:54:46 +00:00
Corinna Vinschen b904c35100 * security.h (cygpriv_idx): Add privileges new in Vista.
* security.cc (sys_privs): Ditto.
	* sec_helper.cc (cygpriv): Ditto.  Fix comment.
2006-11-01 09:00:14 +00:00
Corinna Vinschen 87abdb3df9 * include/winnt.h (SE_RELABEL_NAME): Define.
(SE_INCREASE_WORKING_SET_NAME): Define.
	(SE_TIME_ZONE_NAME): Define.
	(SE_CREATE_SYMBOLIC_LINK_NAME): Define.
2006-11-01 08:57:57 +00:00
Corinna Vinschen c2b10dc4d8 * cygheap.h (struct user_heap_info): Add slop member.
* heap.cc (heap_init): Add slop factor to heap allocation.  Add
	comment.
	* mmap.cc (MapViewNT): Allocate memory maps top down.
	(fhandler_dev_zero::mmap): Ditto.
	* shared.cc (shared_info::heap_slop_size): New method.
	(shared_info::heap_chunk_size): Don't use debug_printf at early stage.
	* shared_info.h (SHARED_INFO_CB): Accomodate change to shared_info.
	(CURR_SHARED_MAGIC): Ditto.
	(class shared_info): Add heap_slop member.  Declare heap_slop_size.
	* wincap.h: Define heapslop throughout.
	* wincap.cc: Ditto.
2006-10-31 18:41:16 +00:00
Corinna Vinschen 9740f34d11 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Drop
directory attribute for reparse points to avoid mistreating.
	(fhandler_base::fstat_by_name): Ditto.
	* path.cc (symlink_info::check_reparse_point): New method testing
	reparse points for symbolic links.
	(symlink_info::check_shortcut): Move file attribute tesat to calling
	function.
	(symlink_info::check): Add handling for reparse points.
	* path.h (enum path_types): Add PATH_REP to denote reparse point based
	symlinks.
	(path_conv::is_rep_symlink): New method.
	* syscalls.cc (unlink): Handle reparse points.
2006-10-31 11:40:47 +00:00
Corinna Vinschen 3ddf69712b * include/winnt.h (IO_REPARSE_TAG_SYMLINK): Define.
(struct _REPARSE_DATA_BUFFER): Add missing Flags field to
	SymbolicLinkReparseBuffer substructure.
2006-10-31 11:39:58 +00:00
Danny Smith cf8c18dd47 2006-10-29 Daniel Atallah <datallah@users.sourceforge.net>
* lib/ws2_32.def (WSANSPIoctl): Add to lib.
2006-10-29 22:37:10 +00:00
Corinna Vinschen fa9e684236 * shared.cc (open_shared): Drop useless attempt from 2006-08-11. 2006-10-27 10:51:25 +00:00
Corinna Vinschen 17f3068d4e * dcrt0.cc (__api_fatal): Drop spare argument to __small_sprintf.
* smallprint.c (__small_vsprintf): Preserve GetLastError value.
	* winsup.h (api_fatal): Simplify.  Drop duplicate filename arg.
2006-10-27 10:41:51 +00:00
Chris Sutcliffe 6aea277648 2006-10-26 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* lib/Makefile.in: Fix order for 'all' rule.
2006-10-27 01:02:29 +00:00
Corinna Vinschen 74cab745fc * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Fix comment. 2006-10-23 16:41:10 +00:00
Corinna Vinschen 7a229db654 * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Accomodate
buggy RestartScan behaviour of Windows 2000.
	* wincap.h: Define has_buggy_restart_scan throughout.
	* wincap.cc: Ditto.
2006-10-23 15:13:55 +00:00
Corinna Vinschen fc545fe933 * fhandler_disk_file.cc (fhandler_disk_file::facl): Fix whitespace.
* external.cc: Update copyright.
	* fhandler.cc: Ditto.
	* sec_helper.cc: Ditto.
	* security.h: Ditto.
	* security.cc: Ditto.
	(check_registry_access): Return -1 if W_OK is requested.
2006-10-22 19:31:33 +00:00
Corinna Vinschen 2be593d961 * external.cc (cygwin_internal): Use security_descriptor::copy method.
* sec_helper.cc (security_descriptor::malloc): Use own free method.
	Set type.
	(security_descriptor::realloc): Handle the case that psd has been
	allocated using LocalAlloc.  Set type.
	(security_descriptor::free): Ditto.
	* security.cc (get_nt_attribute): Remove.
	(get_reg_security): Remove.
	(get_nt_object_security): Use GetSecurityInfo which handles all
	securable objects.
	(get_nt_object_attribute): Remove.
	(get_object_attribute): Call get_nt_object_security instead of
	get_nt_object_attribute.
	(get_file_attribute): Ditto.
	(check_registry_access): Call get_nt_object_security instead of
	get_reg_security.
	* security.h (cygpsid::operator PSID): Make method const, not the
	result.
	(class security_descriptor): Add type member.  Accomodate throughout.
	(security_descriptor::copy): New method.
	(security_descriptor::operator PSECURITY_DESCRIPTOR *): New operator.
2006-10-22 14:57:43 +00:00
Corinna Vinschen 2b26c2fc41 * fhandler.cc (fhandler_base::fhaccess): Check if opening registry
actually created a handle.  This handles the registry root dir.
	* fhandler_registry.cc (fhandler_registry::open): Set io_handle in
	case of opening one of the predefined registry keys.
2006-10-22 09:38:47 +00:00
Corinna Vinschen 70158cafd7 * regtool.cc (key_type): Drop.
(REG_AUTO): Define.
	(value_type): Replace key_type.  Use REG_xxx values directly.
	Accomodate change throughout.
	(longopts): Add --dword, --dword-le, --none, --qword and --hex options.
	(opts): Add -d, -D, -n, -Q and -x options.
	(types): Array to convert REG_xxx into strings.
	(hex): New variable to keep value of --hex option.
	(usage): Accomodate new options.  Print only the necessary by default.
	Only be verbose in case of -h/--help option.
	(cmd_list): Use key separator from -K option when printing.
	Print value type when verbose option is given.  Handle so far not
	handled REG_xxx types.
	(cmd_set): Avoid SEGV due to missing argument.  Handle so far not
	handled REG_xxx types.
	(cmd_get): Handle --binary option type agnostic.  Handle so far not
	handled REG_xxx types.
	(main): Handle new options.
2006-10-21 17:19:29 +00:00
Corinna Vinschen 1b4153db74 * fhandler.cc (fhandler_base::fhaccess): Call check_registry_access
for registry keys/values if ntsec is on.
	* security.cc (check_access): New static function derived from
	check_file_access, but object type agnostic.
	(check_file_access): Only do file specific stuff.  Call check_access.
	(check_registry_access): New access check function for registry keys/
	values.
	* security.h (check_registry_access): Declare.
2006-10-21 11:05:32 +00:00
Corinna Vinschen 9367c0dcff * fhandler_registry.cc (fhandler_registry::fstat): Set restrictive
permission and ownership if key can't be opened for reading security.
	(open_key): If opening key fails, retry opening with backup intent.
2006-10-21 10:58:35 +00:00
Corinna Vinschen d698e833cd * net.cc (cygwin_getnameinfo): Fix typo in comment. 2006-10-20 12:57:25 +00:00
Corinna Vinschen 20f9af5348 * fhandler.h (fhandler_base::set_name): Make virtual.
(class fhandler_registry): Add wow64 and prefix_len members.
	Declare set_name method.
	* fhandler_proc.cc (PROC_REGISTRY32): Define.
	(PROC_REGISTRY64): Define.
	(proc_listing): Add "registry32" and "registry64" elements.
	(proc_fhandlers): Add corresponding FH_REGISTRY values.
	* fhandler_registry.cc (registry_len): Drop static value in favor of
	class member prefix_len.  Use preifx_len instead of registry_len
	throughout.
	(fhandler_registry::set_name): Define.  Set wow64 and prefix_len
	according to directory prefix.
	(fhandler_registry::fhandler_registry): Set wow64 and prefix_len to
	default values.
	(open_key): Add wow64 argument.  Handle wow64 in call to RegOpenKeyEx.
	Use fhandler_registry member wow64 in this place throughout.
2006-10-19 10:01:03 +00:00
Corinna Vinschen d145878a07 * fhandler_proc.cc: Drop superfluous definition of _WIN32_WINNT.
* miscfuncs.cc: Ditto.
	* sched.cc: Ditto.
2006-10-19 09:15:26 +00:00
Corinna Vinschen 3c256e38f9 * regtool.cc (longopts): Add --wow32 option.
(opts): Add -W option.
	(usage): Add text for --wow32/-W option.
	(main): Handle --wow32/-W option.
	* utils.sgml: Document the new -W option.
2006-10-19 09:08:44 +00:00
Corinna Vinschen 733c9ed374 * glob.c: Remove.
* glob.cc: New file.  Latest glob version from FreeBSD plus Cygwin
	specific changes (__stat64/__stat32, ignore_case_with_glob,
	drop collate functions).
	(glob3): Return GLOB_ABORTED in case directory is unreadable and
	GLOB_ERR is set, as demanded by SUSv3.
	* glob.h: Import latest version from FreeBSD.
2006-10-17 17:34:56 +00:00
Corinna Vinschen bf4875e4b0 * winsup.h (WINVER): Define instead of _WIN32_WINNT. Set to 0x0502.
(_NO_W32_PSEUDO_MODIFIERS): Define.
2006-10-17 13:55:05 +00:00
Corinna Vinschen 53930874cb * regtool.cc (KEY_WOW64_64KEY): Drop definition. Instead define
WINVER to 0x0502 before including windows.h.
2006-10-16 19:34:27 +00:00
Corinna Vinschen 40c60b89d5 * regtool.cc (KEY_WOW64_64KEY): Define.
(longopts): Add --wow64 option.
	(opts): Add -w option.
	(wow64): New variable to control usage of KEY_WOW64_64KEY access flag.
	(usage): Add text for --wow64/-w option.
	(print_version): Fix copyright.
	(find_key): Use wow64 value in calls to RegOpenKeyEx and RegCreateKeyEx.
	(cmd_add): Use wow64 value in call to RegCreateKeyEx.
	(regDeleteKeyEx): New function pointer to load RegDeleteKeyEx function
	dynamically.
	(cmd_remove): Load and use regDeleteKeyEx when wow64 is set.
	(main): Handle --wow64/-w option.
	* utils.sgml: Document the new -w option.
2006-10-16 18:00:06 +00:00
Corinna Vinschen 0b8affca5e * fhandler_disk_file.cc (fhandler_disk_file::opendir): Drop redundant
access check.
2006-10-16 13:11:29 +00:00
Corinna Vinschen c28fea1bdc * include/asm/byteorder.h: Fix copyright dates.
Fix typos in ChangeLog.
2006-10-16 12:34:34 +00:00
Corinna Vinschen b031f5c3c5 Fix pathnames. 2006-10-16 12:31:19 +00:00
Corinna Vinschen 2c1ffdbf5e * autoload.cc (PrivilegeCheck): Define.
* fhandler.cc (fhandler_base::open): Always try opening with backup
	resp. restore intent.
	* fhandler_disk_file.cc (fhandler_disk_file::opendir): Always try
	opening with backup intent.
	(fhandler_disk_file::readdir): Ditto when trying to retrieve file id
	explicitely.
	* security.cc (check_file_access): Replace pbuf with correctly
	PPRIVILEGE_SET typed pset.  Check explicitely for backup and/or restore
	privileges when AccessCheck fails, to circumvent AccessCheck
	shortcoming.  Add comment to explain.
2006-10-16 12:26:59 +00:00
Christopher Faylor 7af26e0cc0 * winsup.h: Turn off DEBUGGING. 2006-10-13 12:49:18 +00:00
Corinna Vinschen ace7360b45 * Makefile.in (CFLAGS): Drop -nostdinc.
* cygsuba.c: Reorder includes to allow building with VC++.
	* make-64bit-version-with-visual-c.bat: New file.
2006-10-13 11:55:05 +00:00
Corinna Vinschen fb7dc2480c * autoload.cc (Wow64DisableWow64FsRedirection): Define.
(Wow64RevertWow64FsRedirection): Define.
	* security.cc (cygsuba_installed): New shared variable to store result
	of cygsuba.dll installation test.
	(subauth): Check if cygsuba.dll has been installed and registered
	before issuing the (sub)authentication.
2006-10-13 11:10:28 +00:00
Corinna Vinschen 208e95c2f2 * security.cc (create_token): Fix condition for source identifier. 2006-10-12 15:38:26 +00:00
Danny Smith 0d94042d8f * include/winuser.h (LR_DEFAULTSIZE, LR_VGACOLOUR): Define. 2006-10-12 04:25:56 +00:00
Corinna Vinschen 9565e2333c * select.cc (struct socketinf): Convert ser_num and w4 to dynamically
allocated arrays.  Add max_w4 member to keep track.
	(thread_socket): Make timeout depending on number of sockets to wait
	for.  Loop WFMO over all sockets.
	(start_thread_socket): Handle any number of sockets.  Fix typo.  Don't
	close socket event in out of memory condition.
	(socket_cleanup): Free ser_num and w4.
2006-10-11 16:21:12 +00:00
Corinna Vinschen b9c7deed9a * path.cc (path_conv::get_nt_native_path): Properly detect \\?\ paths.
(mount_info::conv_to_win32_path): Update comment.
	* fhandler_disk_file.cc (path_conv::ndisk_links): Use backslashes
	to make NT kernel functions work for \\?\GLOBALROOT paths.
2006-10-09 14:01:52 +00:00
Corinna Vinschen 5623fbd4ca * devices.in: Raise number of handled serial ports to 64.
* devices.cc: Regenerate.
2006-10-09 08:27:23 +00:00
Christopher Faylor 16b6142ad4 . 2006-10-06 22:32:09 +00:00
Corinna Vinschen cea9b62102 * cygcheck.cc (get_word, get_dword): Move to path.cc.
(LINK_EXTENSION): New macro.
	(check_existence): New static function.
	(find_on_path): Check for symbolic links if asked.
	(dll_info): New error handling.
	(track_down): Only call dll_info() for executables, display
	an error for symlinks, and print magic number for others.
	(find_app_on_path): New static function.
	(cygcheck, dump_sysinfo): Call find_app_on_path() instead of
	find_on_path().
	* path.cc (cmp_shortcut_header): New static function.
	(get_word, get_dword): Moved from cygcheck.cc.
	(EXE_MAGIC, SHORTCUT_MAGIC, SYMLINK_COOKIE, SYMLINK_MAGIC): New
	macros.
	(is_exe, is_symlink, readlink): New functions.
	* path.h (is_exe, is_symlink, readlink): Declare.
	(get_word, get_dword): Ditto.
2006-10-05 17:24:13 +00:00
Danny Smith 66845c62b1 * include/winreg.h (RegDeleteKeyEx{A|W}): Add prototype and UNICODE
mappings.
	(KEY_WOW64_32KEY, KEY_WOW64_64KEY): Define.
	* lib/advapi.def (RegDeleteKeyEx{A|W}): Export.
2006-10-05 07:36:06 +00:00
Corinna Vinschen fbcc8bbe74 * Makefile.in: Semi-revert semi-reversion of 2006-08-30 change, now
correctly parenthesized.
2006-10-04 12:52:42 +00:00
Danny Smith e4aebff6e8 * include/winnt.h (CASSERT): Define.
[mingw-Bugs-1568067]
	* include/winuser.h: (DISP_CHANGE_BADDUALVIEW): Define.
	* include/wingdi.h: (DM_POSITION): Define.
2006-10-04 08:57:27 +00:00
Danny Smith b3fc0d3bf5 * lib/rpcrt4.def: Remove "_imp__"-prefixed export symbols.
* lib/user32.def: Likewise.
2006-10-03 08:43:40 +00:00
Danny Smith c0b5e094e2 * mingwex/mb_wc_common.h (get_codepage): Get it
from __lc_codepage.
2006-09-19 09:09:58 +00:00
Christopher Faylor b44ba33a1f * byteorder.h: Correct typo. 2006-09-17 23:22:10 +00:00
Christopher Faylor 22aa38a0a8 * byteorder.h: Don't #define n* macros if -fnoinline is specified. 2006-09-17 22:34:45 +00:00
Danny Smith dad3363707 * mingwex/gdtoa/g_xfmt.c (g_xfmt): Fix representation of infinity. Use fpclassify.
* mingwex/gdtoa/strtopx (__strtopx): Avoid cast of long double* to void*.
	* mingwex/gdtoa/gdtoa.h (__g_fmt): Make declaration consistent with others.
2006-09-17 22:27:56 +00:00
Danny Smith 3e231d9a38 * mingwex/gdtoa/strtopx.c (strtopx): Fix (sic) infinity. 2006-09-16 07:35:45 +00:00
Christopher Faylor 8552e20ec4 white space 2006-09-13 15:33:37 +00:00