Commit Graph

6996 Commits

Author SHA1 Message Date
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