Commit Graph

7081 Commits

Author SHA1 Message Date
Corinna Vinschen f36c78a487 * mkgroup.c (main): Fix test for duplicate domain/machine request.
* mkpasswd.c (main): Ditto.
2008-07-23 20:12:12 +00:00
Corinna Vinschen f9519bcd1a * mkgroup.c: Rework to allow per-domain/per-machine id_offset.
Add -b option to skip builtin groups.
	(main): Simplify code.
	* mkpasswd.c: Rework to allow per-domain/per-machine id_offset.
	(main): Simplify code.
	* utils.sgml: Explain changed mkgroup/mkpasswd -d/-D/-l/-L options.
	Add mkgroup -b option.
2008-07-23 18:09:50 +00:00
Corinna Vinschen 0bdab5c8a9 * mkgroup.c: Consolidate variable names.
(enum_unix_groups): New function.
	(print_special): Use LookupAccountSidW instead of LookupAccountSidA.
	(current_group): Ditto.
	(usage): Add -U option.
	(longopts): Add --unix option.
	(opts): Add -U option.
	(main): Handle -U option.  Call enum_unix_groups if set.
	* mkpasswd.c: Consolidate variable names.
	(current_user): Use LookupAccountSidW instead of LookupAccountSidA.
	(enum_unix_users): New function.
	(usage): Add -U option.
	(longopts): Add --unix option.
	(opts): Add -U option.
	(main): Handle -U option.  Call enum_unix_groups if set.
	* utils.sgml: Add -U option text to mkgroup and mkpasswd description.
2008-07-23 11:41:10 +00:00
Corinna Vinschen 02151f07e6 * spawn.cc (spawn_guts): Fix previous patch for UNC paths. 2008-07-23 10:17:04 +00:00
Corinna Vinschen 7e1fdc9e2c * mkgroup.c (enum_groups): Create full qualified groupname using
domain or servername, depending on printing domain or machine accounts.
	* mkpasswd.c (enum_users): Ditto for users.
2008-07-22 20:47:14 +00:00
Corinna Vinschen 4aeb44ee37 * mkgroup.c (main): Remove special root group code. Only print
SYSTEM group in case of printing local machine or local domain groups.
2008-07-22 20:12:02 +00:00
Corinna Vinschen 73814f5ee2 Remove erroneous ChangeLog entry. 2008-07-22 17:31:35 +00:00
Corinna Vinschen 19dc8ba9b2 * spawn.cc (spawn_guts): Remove long path prefix from win32 path
before calling CreateProcess if path length is < MAX_PATH.
2008-07-22 16:59:59 +00:00
Corinna Vinschen a1e1990348 * Makefile.in (cygcheck.exe): Link against ntdll.
* bloda.cc: Use statically linked functions throughout.
	* cygpath.cc: Drop 9x considerations.
	* mkgroup.c: Revamp.  Redefine -l and -d options to take optional
	machine and domain parameters.  Redefine -c to work always, using
	token information.  Add -L, -D, -C to create unique groupnames in
	domain\group syntax.  Add -S option to define domain\group separator
	char.  Ignore -u and -s options.
	* mkpasswd.c: Revamp.  Redefine -l and -d options to take optional
	machine and domain parameters.  Redefine -c to work always, using
	token information.  Add -L, -D, -C to create unique usernames in
	domain\user syntax.  Add -S option to define domain\user separator
	char.  Ignore -g and -s options.  Prefer to take homedir from $HOME
	over $HOMEDRIVE/$HOMEPATH.
	* path.cc (oopts): Add "acl", "noacl", "posix=0" and "posix=1" options.
	(getmntent): Accomodate throughout.
	* ps.cc: Fix copyright dates.
	* utils.sgml: Fix text for mkgroup and mkpasswd.
2008-07-22 14:40:05 +00:00
Corinna Vinschen 737a72dd0e * include/ctype.h: Declare __ctype_ptr__ to keep newlib build happy. 2008-07-22 10:38:18 +00:00
Corinna Vinschen 0485c2ceec * Makefile.in (cygcheck.exe): Link against ntdll.
* bloda.cc: link against ntdll functions statically.
	* cygpath.cc (get_user_folder): Drop 9x code.
	(print_version): Fix copyright.
	* mkgroup.c: Remove 9x code.
	* mkpasswd.c: Ditto.
	* path.cc (oopts): Add new mount options.
	* ps.cc: Fix copyright.
2008-07-21 13:44:42 +00:00
Corinna Vinschen 5a3ed02610 * autoload.cc (WNetGetProviderNameA): Define.
(WNetGetResourceParentA): Remove.
	* fhandler_netdrive.cc (struct net_hdls): New structure to keep
	WNet handles.  Stored in dir->__handle throughout.
	(thread_netdrive): Rewrite to enumerate all servers in all accessible
	domains and workgroups.
	(fhandler_netdrive::readdir): Simplify toplevel code.  Lowercase all
	server names in toplevel.
	(fhandler_netdrive::rewinddir): Close all WNet handles and free
	net_hdls structure.
2008-07-19 12:26:09 +00:00
Corinna Vinschen 8d7e80c2e1 * fhandler.cc (fhandler_base::open): Rename x to fh. On Samba, always
create file with NULL security descriptor and set the permissions
	afterwards.  Explain why.
2008-07-18 12:21:22 +00:00
Corinna Vinschen d83c6a77d2 * cygwinenv.sgml: Move binmode option to list of removed options. 2008-07-18 08:17:28 +00:00
Corinna Vinschen fd8e5366aa * environ.cc (known): Remove "binmode" option.
* fhandler.cc (binmode): Remove.
	(fhandler_base::set_flags): Accommodate binmode removal.
	* path.h (path_conv::set_binary): Remove.
	* pipe.cc (pipe): Create pipes always as binary pipes.
	* winsup.h (binmode): Remove declaration.
2008-07-18 08:16:40 +00:00
Corinna Vinschen 874149c80c * mount.cc (do_mount): Remove MOUNT_ENC code.
(oopts): Remove "managed" option.
	(mount_commands): Drop "managed" handling.
	* path.cc (oopts): Remove "managed" option.
	(getmntent): Remove MOUNT_ENC code.
2008-07-17 15:07:48 +00:00
Corinna Vinschen 5fc03e3d73 * mount.cc (mount_info::from_fstab_line): Default to binary mount. 2008-07-17 14:14:34 +00:00
Corinna Vinschen 85f1119b7b * Revamp documentation for Cygwin 1.7, part 1. 2008-07-17 11:49:45 +00:00
Corinna Vinschen b2dab9e8bc * utils.sgml: Add id's to all examples. 2008-07-17 10:32:03 +00:00
Corinna Vinschen a0c53f920f * path.cc (allow_winsymlinks): Revert default to create system bit
symlinks for speed.
2008-07-16 21:08:22 +00:00
Corinna Vinschen e4b575030b Add case-sensitivity.
Unconditionally handle mount points case-sensitive.
	Unconditionally handle virtual paths case-sensitive.
	Unconditionally handle registry paths case-insensitive.
	Otherwise, accommodate case-sensitivity of given path throughout.
	* cygheap.cc (cygheap_root::set): Get additional caseinsensitive
	parameter and store it.
	* cygheap.h (struct cygheap_root_mount_info): Add member
	caseinsensitive.
	* dlfcn.cc (get_full_path_of_dll): Drop PC_NOFULL parameter from call
	to path_conv::check.
	* environ.cc (pcheck_case): Remove.
	(check_case_init): Remove.
	(known): Drop "check_case" option.
	* exceptions.cc (open_stackdumpfile): Add comment.
	* fhandler.cc (fhandler_base::get_default_fmode): Call pathmatch
	instead of strcasematch.
	* fhandler_disk_file.cc: Accommodate case-sensitivity of given path
	throughout.
	(__DIR_mounts::check_mount): Unconditionally check virtual paths
	case-sensitive.
	(fhandler_disk_file::link): Drop case clash handling.
	(fhandler_disk_file::open): Ditto.
	(fhandler_disk_file::readdir_helper): Drop managed mount code.
	* mount.cc: Remove managed mount code and datastructures.
	(struct opt): Remove "managed" option.  Add "posix=0" and "posix=1"
	options.
	(fillout_mntent): Remove "managed" output.  Add "posix" output.
	* path.cc (struct symlink_info): Remove case_clash member and
	case_check method.
	(pcheck_case): Remove.
	(path_prefix_p): Take additional bool parameter "caseinsensitive".
	(pathnmatch): Ditto.
	(pathmatch): Ditto.
	(mkrelpath): Ditto.
	(fs_info::update): Set caseinsensitive flag according to file system
	name and FILE_CASE_SENSITIVE_SEARCH flag.  Add comment.
	(tfx_chars_managed): Remove.
	(transform_chars): Drop "managed" parameter.  Always use tfx_chars.
	(get_nt_native_path): Drop "managed" parameter.  Make sure drive letters
	are always upper case.
	(getfileattr): Change second parameter to denote caseinsensitivity.
	(path_conv::check): Initialize caseinsensitive to OBJ_CASE_INSENSITIVE.
	Set caseinsensitive according to global obcaseinsensitive flag, file
	system case sensitivity and MOUNT_NOPOSIX mount flag.
	Drop case_clash and all the related code.
	(symlink_worker): Drop case clash handling.
	(symlink_info::set): Drop setting case_clash.
	(symlink_info::case_check): Remove.
	(cwdstuff::set): Add comment.
	(etc::init): Take path_conv instead of PUNICODE_STRING as parameter to
	allow case sensitivity.
	* path.h (enum pathconv_arg): Drop PC_SYM_IGNORE.
	(enum case_checking): Remove.
	(enum path_types): Drop PATH_ENC, add PATH_NOPOSIX flag.
	(struct fs_info): Add caseinsensitive flag and accessor methods.
	(class path_conv): Add caseinsensitive member and define
	objcaseinsensitive method.  Drop case_clash member and isencoded method.
	(pathmatch): Change prototype according to above change.
	(pathnmatch): Ditto.
	(path_prefix_p): Ditto.
	(get_nt_native_path): Ditto.
	(class etc): Ditto.
	(fnunmunge): Remove prototype.
	* shared.cc (shared_info::init_obcaseinsensitive): Initialize
	obcaseinsensitive flag from obcaseinsensitive registry value.
	(shared_info::initialize): Call init_obcaseinsensitive here by the
	first process creating the shared memory.
	* shared_info.h (mount_item::fnmunge): Remove.
	(shared_info::obcaseinsensitive): Rename from obcaseinsensitivity.
	(shared_info::init_obcaseinsensitive): Declare.
	* syscalls.cc (try_to_bin): Add comment.
	* include/sys/mount.h (MOUNT_ENC): Remove flag.
	(MOUNT_NOPOSIX): Add flag.
2008-07-16 20:20:45 +00:00
Corinna Vinschen bed5a336c4 * cyglsa-config: Always create a /bin/cyglsa directory and copy the
LSA DLL there.  Register this copy in the registry.
2008-07-16 19:33:54 +00:00
Corinna Vinschen 80f6f52cb1 * fhandler_tape.cc (mtinfo::initialize): Remove synchronization stuff.
Just initialize drive data.
	* mtinfo.h (MTINFO_MAGIC): Remove.
	(MTINFO_VERSION): Remove.
	(class mtinfo): Remove magic and version members.
	* shared.cc (shared_info::initialize): Move call to
	get_session_parent_dir so that the dir creation is only called once.
	Move call to mt.initialize so that it's called only by the first
	process creating the shared memory.
	* shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info.
	(CURR_SHARED_MAGIC): Ditto.
	(class shared_info): Add obcaseinsensitivity member.
2008-07-15 11:42:45 +00:00
Corinna Vinschen dc4b5caedc * cyglsa.c: Include ntddk.h again, but only if __MINGW32__ is defined.
* cyglsa64.dll: Regenerate.
	* make-64bit-version-with-visual-c.bat: Fix comment.
2008-07-15 09:43:48 +00:00
Corinna Vinschen 3e153bcd55 * fhandler.cc (fhandler_base::fpathconf): On _PC_POSIX_PERMISSIONS
and _PC_POSIX_SECURITY, return true for NFS, too.
2008-07-14 20:46:27 +00:00
Corinna Vinschen e2406d71aa Throughout drop allow_ntsec and allow_smbntsec handling.
* environ.cc (set_ntsec): Remove.
	(set_smbntsec): Remove.
	(known): Remove ntsec and smbntsec options.
	* external.cc (check_ntsec): Return true if no filename is given.
	* mount.cc (oopts): Add "acl" and "noacl" options.  Set MOUNT_NOACL
	flag accordingly.
	(fillout_mntent): Handle MOUNT_NOACL flag.
	* path.h (enum path_types): Add PATH_NOACL.
	* security.cc (allow_ntsec): Remove.
	(allow_smbntsec): Remove.
	* security.h (allow_ntsec): Drop declaration.
	(allow_smbntsec): Drop declaration.
	* include/sys/mount.h (MOUNT_NOACL): Define.
2008-07-14 20:22:03 +00:00
Corinna Vinschen bf216dcad6 * miscfuncs.cc (cygwin_strncasecmp): Fix bug which results in
prematurely truncated strings.  Simplify target length argument to
	sys_mbstowcs.
2008-07-14 19:58:16 +00:00
Corinna Vinschen 88d1b6df94 * autoload.cc (GetExtendedTcpTable): Define.
* fhandler_socket.cc (address_in_use): Take const struct sockaddr
	pointer as argument.  Implement additional AF_INET6 table check.
	(fhandler_socket::bind): Drop AF_INET test before calling
	address_in_use.
	* net.cc (ipv4_getnameinfo): Return EAI_FAMILY instead of 1 if
	called with unsupported af_family.
2008-07-14 15:56:11 +00:00
Corinna Vinschen c0bb6b5bd6 * include/iphlpapi.h (GetExtendedTcpTable): Add prototype.
* include/iprtrmib.h (TCP_TABLE_CLASS, MIB_TCPROW_OWNER_PID,
	MIB_TCPTABLE_OWNER_PID, MIB_TCP6ROW_OWNER_PID,
	MIB_TCP6TABLE_OWNER_PID): Define.
	* lib/iphlpapi.def (GetExtendedTcpTable): Export.
2008-07-14 15:55:48 +00:00
Corinna Vinschen 5a0c7f1df9 * cyglsa.c: Don't include ntddk.h.
(RtlInitEmptyUnicodeString): Use Visual-C compatible "__inline" instead
	of "inline".
	(uni_alloc): Change second argument to USHORT.
	(printf): Move definition of ap to make Visual-C++ happy.
	(LsaApLogonUserEx): Compute size of datastructure returned to
	LSA on 64 bit systems correctly to avoid heap corruption.
	* cyglsa64.dll: Regenerate.
	* make-64bit-version-with-visual-c.bat: Accommodate newer Microsoft
	toolchains.  Add more comment.
	* mslsa.def: Export LsaApLogonUserEx instead of LsaApLogonUser.
2008-07-13 13:14:41 +00:00
Eric Blake 25dab6dc60 Fix usage of recently fixed Interlocked* functions.
* winbase.h (ilockincr, ilockdecr, ilockexch, ilockcmpexch): Add
volatile qualifier, to match Interlocked* functions.
2008-07-12 18:09:17 +00:00
Corinna Vinschen 84e2d2e6cf * select.cc (peek_pipe): Temporarily revert patch from 2008-05-30. 2008-07-11 16:37:29 +00:00
Corinna Vinschen 824fe06cbe * cyglsa.c (LsaApLogonUserEx): Accommodate the fact that authinf->domain
and authinf->username are now of type WCHAR.  Change sam_username and
	sam_u size to be deifned in terms of MAX_DOMAIN_NAME_LEN instead of
	INTERNET_MAX_HOST_NAME_LENGTH.
2008-07-11 10:00:38 +00:00
Corinna Vinschen 9a51257715 Change length for domain buffers from INTERNET_MAX_HOST_NAME_LENGTH to
MAX_DOMAIN_NAME_LEN throughout.
	* cyglsa.h (CYG_LSA_MAGIC): New value.
	(cyglsa_t): Define username and domain as WCHAR arrays.
	* errno.cc (errmap): Add mapping for ERROR_NONE_MAPPED.
	* sec_auth.cc: Drop 'w' prefix from WCHAR string variable names where
	appropriate.
	(extract_nt_dom_user): Prefer resolving by SID before resolving by
	domain\name pair.
	(cygwin_logon_user): Don't print cleartext password in debug output.
	Change comment.
	(get_user_groups): Revert calls to LookupAccountNameW to use NULL
	server instead of explicit server name, according to MSDN.
	(get_user_local_groups): Ditto.
	(get_server_groups): Fetch domain and user name from usersid per
	LookupAccountSidW instead of calling extract_nt_dom_user.
	(lsaauth): Fetch domain and user name from usersid per LookupAccountSidW
	instead of calling extract_nt_dom_user.
	* sec_helper.cc (cygpriv): Convert to wchar_t pointer array.
	(privilege_luid): Convert first parameter to  PWCHAR.
	(privilege_name): Return wchar_t pointer.
	(set_privileges): Accommodate debug output.
	* security.h (privilege_luid): Change prototype accordingly.
2008-07-11 10:00:36 +00:00
Corinna Vinschen ce96cfb292 * cyglsa.c: Revamp debugging output.
(LsaApInitializePackage): Open debugging output file here.
	(LsaApLogonUserEx): Replace LsaApLogonUser.  Add debugging output.
	Create machine name for accounting.  Add (disabled) code to fetch
	a token from GetAuthDataForUser/ConvertAuthDataToToken.
	* cyglsa.din: Relace LsaApLogonUser with LsaApLogonUserEx.
2008-07-10 18:05:03 +00:00
Corinna Vinschen c68cb84e88 * cyglsa.h (SECURITY_STRING): Define.
(enum _SECPKG_NAME_TYPE): Define.
	(struct _SECPKG_CALL_INFO): Define.
	(struct _LSA_SECPKG_FUNCS): Extend to full size.  Define unused
	functions lazily.
	(cygprf_t): Define.
	* sec_auth.cc (lsaauth): Use actual primary group if no admins group.
	Add (disabled) code to fetch token from profil data.
2008-07-10 18:01:25 +00:00
Corinna Vinschen 9035519215 * sec_auth.cc (verify_token): Allow builtin groups missing in a token
and it's still valid.  Explain why.
2008-07-09 15:45:08 +00:00
Corinna Vinschen 375a780e06 * mkgroup.c: Use statically linked functions throughout, except for
DsGetDcNameW.  Reformat.  Convert to use WCHAR for names throughout.
	Use defines instead of constants throughout.
	(MAX_SID_LEN): Define.
	(load_netapi): Just load DsGetDcNameW pointer.
	(psx_dir): Remove.
	(uni2ansi): Remove.
	(enum_local_users): Take server name and use in Net... call.
	(DBGSID): Define datastructure.
	(MAX_BUILTIN_SIDS): Define.
	(builtin_sid_list): Define global sid list.
	(builtin_sid_cnt): Define counter for global sid list.
	(enum_local_groups): Take server name and use in Net... and Lookup...
	calls.  Take offset argument.  Use MAX_PREFERRED_LENGTH in call to
	NetLocalGroupEnum.  Check for duplicate builtin groups.
	(enum_users): Take server name and use in Net... call.
	(usage): Change text slightly.
	(print_version): Fix copyright.
	(main): Call enum_local_groups for domains as well.
	* mkpasswd.c: Use statically linked functions throughout, except for
	DsGetDcNameW.  Reformat.  Convert to use WCHAR for names throughout.
	Use defines instead of constants throughout.
	(MAX_SID_LEN): Define.
	(load_netapi): Just load DsGetDcNameW pointer.
	(uni2ansi): Use wcstombs.
	(current_user): Replace "unused_by_nt/2000/xp" by
	just "unused".
	(enum_users): Ditto.
	(print_version): Fix copyright.
2008-07-09 14:32:29 +00:00
Corinna Vinschen 5558de95e5 * autoload.cc (DsGetDcNameW): Replace DsGetDcNameA.
* dcrt0.cc (child_info_spawn::handle_spawn): Drop artificial
	supplementary group list from calling setgroups in parent.
	* grp.cc (internal_getgroups): Drop 9x-only code.  Reformat.
	* sec_auth.cc (get_logon_server): Do everything in WCHAR only.
	(get_user_groups): Ditto.  Use wlogonserver in LookupAccountNameW
	calls, too.
	(is_group_member): Get logon server as first argument and use in call
	to NetLocalGroupGetMembers.
	(get_user_local_groups): Get logon server as first argument and use in
	calls to NetLocalGroupEnum and LookupAccountNameW.  Revamp to work
	more correctly in domain environments.
	(get_server_groups): Accommodate aforementioned changed function calls.
	* security.h (get_logon_server): Change prototype accordingly.
	* uinfo.cc (cygheap_user::env_logsrv): Accommodate changed
	get_logon_server call.
2008-07-09 11:58:38 +00:00
Corinna Vinschen 8f7208243e * grp.cc (internal_getgroups): Also add integrity-enabled groups. 2008-07-09 09:14:12 +00:00
Corinna Vinschen 2827371898 * sec_auth.cc (verify_token): Disable code which returns false if
the token contains additional groups not requested by setgroups.
	Explain why.
2008-07-09 08:10:25 +00:00
Corinna Vinschen 23672785ee * fhandler_socket.cc (fhandler_socket::bind): Don't run explicit
local socket test in SO_REUSEADDR case on systems supporting
	enhanced socket security.  Explain why.  Only call address_in_use
	for AF_INET sockets.
	* net.cc (cygwin_setsockopt): Don't call setsockopt to set SO_REUSEADDR
	on systems supporting enhanced socket security.  Add comment.
	* wincap.h (wincaps::has_enhanced_socket_security): New element.
	* wincap.cc: Implement above element throughout.
2008-07-08 20:12:46 +00:00
Corinna Vinschen b8fbf5d4c4 * net.cc (ipv6_inited): Make NO_COPY. 2008-07-08 12:37:44 +00:00
Danny Smith 6f6b4e11cb 2008-07-06 Gregory McGarry <gregorymcgarry@users.sourceforge.net>
* include/ctype.h (_imp____mb_cur_max): Correct spelling.
	(_imp____mb_cur_max_dll): Likewise.
2008-07-07 07:58:33 +00:00
Danny Smith 608d5d8f36 * include/stdio.h (swprintf, vswprintf): Guard with #ifndef __STRICT_ANSI__
* include/wchar.h (swprintf, vswprintf): Likewise.
2008-07-04 03:55:50 +00:00
Corinna Vinschen bb82bbe6ff * path.cc (path_conv::is_binary): Fix test. Add comment. 2008-07-02 14:00:27 +00:00
Keith Marshall 278101de7f Add _get_output_format(), _set_output_format() for MSVCRT >= MSVCR80 2008-07-01 22:57:24 +00:00
Christopher Faylor 4534778c4c * Makefile.in: Temporarily add ability to generate pdfs. 2008-07-01 17:17:31 +00:00
Christopher Faylor 3236e43753 * effectively.sgml: Correct subject-verb agreement, missing verb
(typo), preposition and (definite vs indefinite) article use.
2008-06-27 00:34:02 +00:00
Brandon Sneed 8b79fb163b 2008-06-25 Brandon Sneed <nivenh@sourceware.org>
* include/winbase.h (GetProcessHandleCount, GetSystemRegistryQuota,
	GetThreadIOPendingFlag): Modified to rely on _WIN32_WINNT 0x0501 instead
	of 0x0502.
	Bug reported by Thomas Denk.
2008-06-25 21:21:08 +00:00
Brandon Sneed 854c27dd8d 2008-06-25 Brandon Sneed <nivenh@sourceware.org>
* include/winbase.h (InterlockedIncrement, InterlockedDecrement,
	InterlockedCompareExchange, InterlockedExchange,
	InterlockedCompareExchangePointer, InterlockedExchangeAdd,
	InterlockedExchangePointer): Modified from PLONG to LONG volatile *.
2008-06-25 20:53:31 +00:00
Corinna Vinschen 7b3e3bfd49 * net.cc (cygwin_bindresvport_sa): Fix usage of last_used_bindresvport. 2008-06-24 13:13:44 +00:00
Corinna Vinschen 3db08eeece * include/limits.h (PATH_MAX): Add comment.
* include/cygwin/config.h (__FILENAME_MAX__): Define as 4096.  Add
	comment.
2008-06-21 20:24:45 +00:00
Danny Smith 31558344b0 Committed as obvious.
* lib/ddk/hal.def (HalTranslateBusAddress): Correct suffix.
	* lib/ddk/ntoskrnl.def (MmAllocateContiguousMemory): Correct suffix.
	Bug reported by Brian Hawley.
2008-06-20 03:19:15 +00:00
Christopher Faylor 2d03477142 * faq-using.xml: Add more words about multiple cygwins. 2008-06-20 01:46:34 +00:00
Corinna Vinschen 83e80c9178 * fhandler_tty.cc (fhandler_pty_master::setup): Fix pipe inheritance. 2008-06-19 19:50:47 +00:00
Christopher Faylor 4f1ed68c5c * strsig.cc (strsignal): Return non-const buffer to allow building with recent
newlib change.
2008-06-19 00:02:13 +00:00
Corinna Vinschen e4278ecbd2 * sec_auth.cc (DsGetDcNameA): Drop declaration.
(DS_FORCE_REDISCOVERY): Drop definition.
2008-06-17 18:54:16 +00:00
Corinna Vinschen d7d60d10a1 * include/dsgetdc.h (DS_FORCE_REDISCOVERY, DS_FORCE_REDISCOVERY,
DS_DIRECTORY_SERVICE_REQUIRED, DS_DIRECTORY_SERVICE_PREFERRED,
	DS_GC_SERVER_REQUIRED, DS_PDC_REQUIRED, DS_BACKGROUND_ONLY,
	DS_IP_REQUIRED, DS_KDC_REQUIRED, DS_TIMESERV_REQUIRED,
	DS_WRITABLE_REQUIRED, DS_GOOD_TIMESERV_PREFERRED, DS_AVOID_SELF,
	DS_ONLY_LDAP_NEEDED, DS_IS_FLAT_NAME, DS_IS_DNS_NAME,
	DS_RETURN_DNS_NAME, DS_RETURN_FLAT_NAME): Define.
	(DsGetDcNameW, DsGetDcNameA): Declare.
	(DsGetDcName): Define.
	* lib/netapi32.def (DsGetDcNameA, DsGetDcNameW): Export.
2008-06-17 18:53:21 +00:00
Christopher Faylor 7ba4aab9b6 * spawn.cc (spawn_guts): Reinstate call to fhandler_console::need_invisible
since it is required to prevent console flashing.
2008-06-17 15:38:17 +00:00
Corinna Vinschen 95c9157df0 * include/resolv.h (_getshort): Drop declaration.
(_getlong): Ditto.
2008-06-17 10:05:28 +00:00
Danny Smith e161debaba Committed as obvious.
[mingw-Bugs-1801641]
	* include/wchar.h (_wfdopen): Const-ify second arg.
	* include/stdio.h (_wfdopen): Likewise.
	Thanks to <tdragon at users dot sourceforge net>
2008-06-14 09:13:38 +00:00
Corinna Vinschen 0730461203 * mount.cc (mount_info::get_cygdrive_info): Fix usage of user and
system arguments.  Strip trailing slash from path for backward
	compatibility.
2008-06-13 15:22:59 +00:00
Corinna Vinschen 9cdaf8733f * fhandler.h (set_console_state_for_spawn): Drop declaration.
* fhandler_console.cc (set_console_state_for_spawn): Remove.
	(fhandler_console::open): Set console state last.  Don't set
	ENABLE_PROCESSED_INPUT flag.
	* spawn.cc (spawn_guts): Drop call to set_console_state_for_spawn.
2008-06-12 15:57:23 +00:00
Christopher Faylor a7e0bc7bbe remove obsolete comment 2008-06-12 14:55:08 +00:00
Corinna Vinschen 24790b9cdb * path.cc (get_nt_native_path): Drop considerations for DOS devices.
Keep relative paths relative.
	(cygwin_conv_path): Don't try to skip native NT prefixes on relative
	paths.
2008-06-11 14:06:05 +00:00
Corinna Vinschen abe2834a49 * include/cygwin/version.h (CYGWIN_VERSION_MOUNT_REGISTRY): Bump.
(CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME): Remove.
	(CYGWIN_INFO_CYGDRIVE_FLAGS): Remove.
	(CYGWIN_INFO_CYGDRIVE_PREFIX): Remove.
	(CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX): Add comment to differ from the
	registry related defines.
2008-06-11 09:43:59 +00:00
Corinna Vinschen 373a7e22e2 * fhandler_procnet.cc (dad_to_flags): Fix comment. 2008-06-11 08:38:39 +00:00
Corinna Vinschen c9227bf8a7 * fhandler_procnet.cc (get_scope): New static function to evaluate
scope.
	(dad_to_flags): New static array to convert Windows DAD state to
	Linux values.
	(format_procnet_ifinet6): Drop asking for IfIndex, just use Ipv6IfIndex.
	Use get_scope and dad_to_flags to generate more accurate linux-like
	output.
2008-06-10 19:58:58 +00:00
Corinna Vinschen bbfcc68ad2 * net.cc (if_nametoindex): Fix typo in call to get_adapters_addresses.
(if_indextoname): Prefer IPv6 loopback device name over IPv4 loopback
	device name on pre-Vista systems.
	(if_nameindex): Ditto.
2008-06-10 18:15:57 +00:00
Corinna Vinschen 7a2c0a0d6b * fhandler_procnet.cc (format_procnet_ifinet6): Use sprintf rather than
__small_sprintf.
	* net.cc (if_nametoindex): Prefer IPv6IfIndex over IfIndex for
	consistency with /proc/net/if_inet6.
	(if_indextoname): Ditto.
	(if_nameindex): Ditto.
2008-06-10 17:24:00 +00:00
Corinna Vinschen 58014a9b46 * mount.cc (mount_info::from_fstab): Read sizeof (buf) - 2 bytes.
Add code to handle overly long lines.
2008-06-10 17:17:44 +00:00
Corinna Vinschen 93e9098f7c * sec_auth.cc (lsaauth): Make returned token inheritable. 2008-06-10 15:16:01 +00:00
Corinna Vinschen be5937cd97 * devices.cc: Regenerate. 2008-06-10 14:48:24 +00:00
Christopher Faylor 0498e171a5 * devices.in: Remove "Global" from tty device. 2008-06-09 14:01:40 +00:00
Christopher Faylor c230ba2a1c * signal.cc (abort): Only flush streams after signal handler. 2008-06-09 13:45:59 +00:00
Keith Marshall 47140f3cdb Avoid precision errors in round(), lround() and llround() functions. 2008-06-03 18:42:21 +00:00
Christopher Faylor 585cd03044 * cygwin.sc: Remove unrequired and erroneous definition. 2008-06-03 02:22:36 +00:00
Christopher Faylor 11a36faaa6 * select.cc (peek_pipe): Semi-reinstate pipe NT-special write detection. 2008-05-30 17:56:37 +00:00
Christopher Faylor 4f3af63913 add missing entry 2008-05-29 17:09:10 +00:00
Christopher Faylor 2bae7a19e4 * devices.in: Change mapping for /dev/ttyS* and /dev/com*. 2008-05-29 17:08:45 +00:00
Chris Sutcliffe 3589c421a9 2008-05-28 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/commctrl.h (NMLVODSTATECHANGE): Define.

        Thanks to Tim Kosse <botg at users dot sf dot net>.
2008-05-29 01:39:52 +00:00
Chris Sutcliffe 35d597a593 2008-05-28 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/winnt.h (SUBLANG_TIBETAN_BHUTAN): Fix definition.

        Thanks to Nicola Di Nisio <nicoladinisio at users dot sf dot net>.
2008-05-29 01:26:45 +00:00
Christopher Faylor 12cf19762d * mount.cc (mount_info::from_fstab): Use proper buffer size. 2008-05-25 23:51:32 +00:00
Christopher Faylor f524521aab * mount.cc (mount_info::init): Revert previous change.
(mount_info::from_fstab): Change system_printf to debug_printf.  Just use a
local NT_MAX_PATH sized temporary buffer.
2008-05-24 15:59:01 +00:00
Corinna Vinschen 0fd62c686d * mount.cc (mount_info::init): Recreate path when trying to read the
user fstab file.
2008-05-24 10:07:49 +00:00
Corinna Vinschen 362ce9fa99 * path.cc (symlink_info::check): Reorder test for nfs symlinks. 2008-05-24 09:54:32 +00:00
Corinna Vinschen 6afd630106 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Don't try to
use FileIdBothDirectoryInformation on NFS shares.  Fix comment to
	explain why.
	* path.cc (symlink_info::check): Reinstantiate no_ea.  Use in
	erroneously changed condition.
2008-05-23 17:22:18 +00:00
Christopher Faylor e765b3c0ad * mount.cc (find_root_from_cygwin_dll): New function factored from from_fstab.
Avoid use of tls since it isn't necessarily initialized when cygwin1.dll is
dynamically loaded.
(mount_info::create_root_entry): Ditto.
(mount_info::init): Calculate cygwin root once.  Use create_root_entry to
record it.  Pass fstab location to from_fstab.
(mount_info::from_fstab): Move root calculation stuff elsewhere, as per above.
* shared_info.h (mount_info::from_fstab_line): Make private.
(mount_info::fstab): Ditto.  Accommodate new arguments.
2008-05-23 16:38:51 +00:00
Christopher Faylor 7cd4542873 * mount.cc (mount_info::from_fstab): Use cygwin_hmodule rather than trying to
find handle based on cygwin1.dll.
* path.cc (symlink_info::check): Remove unused variable.
2008-05-23 15:33:03 +00:00
Corinna Vinschen 7075440208 * shared.cc (open_shared): Fix comments. Fix a condition which has
been overlooked to revert to its old state in change from 2008-04-18.
2008-05-23 11:59:37 +00:00
Corinna Vinschen 1870c68806 * path.cc (symlink_info::check): Define eabuf and easize outside of
loop.  Set to NULL on first STATUS_EAS_NOT_SUPPORTED.  Align comments.
	Fix formatting.
2008-05-23 11:00:35 +00:00
Corinna Vinschen b4ea313a85 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Eliminate
compiler warning.
2008-05-23 10:01:34 +00:00
Christopher Faylor 81adfe2862 * path.cc (symlink_info::check): Don't pass EaBuffer to NtCreateFile if it has
indicated that it isn't appropriate.
* ntdll.h (STATUS_EAS_NOT_SUPPORTED): Define.
* winsup.h: Remove __builtin* defines.
2008-05-23 07:13:47 +00:00
Corinna Vinschen 8a179967e6 * grp.cc (internal_getgroups): Fix thinko. Only add enabled groups to
the group list.
2008-05-22 21:14:30 +00:00
Corinna Vinschen 2122048bd6 * grp.cc (internal_getgroups): Don't add deny-only groups to the group
list.
2008-05-22 21:03:54 +00:00
Corinna Vinschen c15121a287 * cygtls.h (struct san): Add two int values to store the current
tls_pathbuf counters.
	(return_from_fault): Restore tls_pathbuf counters.
	(setup_fault): Save tls_pathbuf counters.
	* tlsoffset.h: Regenerate.
2008-05-22 20:32:15 +00:00
Corinna Vinschen 3ad8ec8546 * setfacl.c (setfacl): Change from void to int. Return 2 in case of
error.
	(main): Return with error code from setfacl.
2008-05-22 18:56:26 +00:00
Corinna Vinschen c1410a8d1e * sec_acl.cc (setacl): Set errno to EINVAL if user or group don't exist. 2008-05-22 12:43:18 +00:00
Corinna Vinschen b72918135c * path.cc (cygwin_conv_path): Define tp before setting up faul handler.
* syscalls.cc: Ditto, throughout.
	(gen_full_path_at): Add bool parameter to allow NULL pathname.
	(futimesat): Allow NULL pathname as GLIBC.
2008-05-22 11:18:46 +00:00