Commit Graph

4201 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 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
Corinna Vinschen bb82bbe6ff * path.cc (path_conv::is_binary): Fix test. Add comment. 2008-07-02 14:00:27 +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
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
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
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
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
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
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 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
Christopher Faylor 9ea50a60e1 * string.h (strchr): Eliminate.
* syscalls.cc (rename): Work around inexplicable C++ warning.
2008-05-22 01:25:37 +00:00
Corinna Vinschen 380b8bac12 * fhandler_disk_file.cc (get_ino_by_handle): Rename pfai to fai.
(fhandler_base::fstat_by_handle): Drop fai_size and pfai in favor of
	static struct fai_buf.  Restructure.
	(fhandler_base::fstat_by_name): Drop fvi_size and pfvi.  Drop fdi_size
	and pfdi in favor of static struct fdi_buf.  Drop redundant test for
	existance.  Use FileDirectoryInformation class instead of
	FileBothDirectoryInformation.  Drop call to NtQueryVolumeInformationFile
	in favor of using pc.fs_serial_number ().  Fix FileId information given
	to fstat_helper.
	(fhandler_disk_file::fstatvfs): Drop fvi_size, pfvi, fai_size and pfai.
	Drop getting FileFsVolumeInformation and FileFsAttributeInformation in
	favor of using the related path_conv info.
	(fhandler_disk_file::opendir): Fix comment.
	(fhandler_disk_file::readdir): Ditto.  Use FileDirectoryInformation
	class instead of FileBothDirectoryInformation.
	* path.cc (fs_info::update): Store MaximumComponentNameLength in new
	member name_len.
	* path.h (struct fs_info): Use ULONG rather than DWORD.  Add member
	name_len to store MaximumComponentNameLength.  Add accessor methods.
	(path_conv::fs_name_len): New method.
2008-05-21 10:23:19 +00:00