summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
...
* * dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote shares.Christopher Faylor2002-06-0538-61/+59
| | | | | | * path.cc (mount_info::conv_to_win32_path): Set flags to binary when mount entry is not found. (mount_info::set_flags_from_win32_path): Ditto.
* * dtable.cc (handle_to_fn): Correct placement and length of name buffer.Christopher Faylor2002-06-052-2/+7
| | | | (Suggested by Pavel Tsekov)
* Remove fcntl.h includes throughout.Christopher Faylor2002-06-0533-146/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fhandler.h: Move fcntl.h include here. (fhandler_base::set_flags): Accept supplied_bin argument. Make non-inlined. * dtable.cc (dtable::init_std_file_from_handle): Just use binmode from pc. (reset_to_open_binmode): Use set_flags. * cygwin.din (open): Avoid newlib wrapper. (read): Ditto. (unlink): Ditto. (write): Ditto. * fhandler.cc (fhandler_base::set_flags): Accept supplied_bin argument. Make binmode decisions here. (fhandler_base::open): Avoid using pc if it is NULL. Eliminate binmode logic. Just call set_flags with binmode argument. (fhandler_base::init): Call set_flags with binmode argument. * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto. * fhandler_console.cc (fhandler_console::open): Ditto. (fhandler_console::init): Force binary on open. * fhandler_disk_file.cc (fhandler_disk_file::open): Don't set binmode here. Let it happen in base class. * fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode open. Set return value appropriately if unable to open. * fhandler_proc.cc (fhandler_proc::open): Make sure flags are set before open_status. * fhandler_process.cc (fhandler_process::open): Ditto. * fhandler_registry.cc (fhandler_registry::open): Ditto. * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto. * fhandler_raw.cc (fhandler_dev_raw::open): Force O_BINARY by default. * fhandler_serial.cc (fhandler_serial::init): Ditto. * fhandler_tty.cc (fhandler_tty_slave::open): Ditto. (fhandler_pty_master::open): Ditto. * fhandler_virtual.cc (fhandler_virtual::open): Ditto. * fhandler_windows.cc (fhandler_windows::open): Ditto. * fhandler_zero.cc (fhandler_dev_zero::open): Ditto. * net.cc (fdsock): Ditto. * path.cc (path_conv::check): Avoid checking for extension when error or directory. (set_flags): Set PATH_TEXT explicitly, when appropriate. (mount_info::conv_to_win32_path): Use set_flags() to set path flags. * path.h (PATH_TEXT): New enum. (path_conv::binmode): Return appropriate constant based on binmode. * pipe.cc (make_pipe): Set binmode to O_TEXT xor O_BINARY. * syscalls.cc (setmode_helper): Make debugging message a little clearer. (setmode): Set binmode via set_flags.
* * fhandler.h (class fhandler_socket): Add private methodCorinna Vinschen2002-06-043-4/+28
| | | | | | | | | | | fixup_after_fork (bool, HANDLE). * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Move functionality to new private method. Add closing parent socket if not called from dup(). Create method new calling private method with appropriate parameter. (fhandler_socket::fixup_after_exec): Call private method fixup_after_fork with appropriate parameter. (fhandler_socket::dup): Ditto.
* * fhandler_dsp.cc (fhandler_dev_dsp::open): Set errno to EACCES ifCorinna Vinschen2002-06-042-1/+9
| | | | requested mode isn't supported.
* * fhandler.cc (fhandler_base::open): Don't set binmode if already set. Don'tChristopher Faylor2002-06-045-24/+42
| | | | | | | | | | | | | check for file. Files should already be set. Report on binary mode for debugging. (fhandler_base::fhandler_base): Don't set default binmode here. That's for later. * fhandler_console.cc (fhandler_console::output_tcsetattr): Don't set binmode, ever, for console. * fhandler_disk_file.cc (fhandler_disk_file::open): Always set the binary mode to the value derived from mount table. * path.cc (mount_info::conv_to_win32_path): Default to binmode if path does not translate into anything in the mount table.
* * external.cc (cygwin_internal): Add CW_EXTRACT_DOMAIN_AND_USERCorinna Vinschen2002-06-033-1/+17
| | | | | | handling to call extract_nt_dom_user() from applications. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_EXTRACT_DOMAIN_AND_USER.
* * syscalls.cc (stat64_to_stat32): Transform st_dev correctly.Corinna Vinschen2002-06-035-7/+39
| | | | | | | | | | (fstat64): Add evaluating st_ino and st_dev. (stat_worker): Evaluate st_dev as 32 bit value. * include/cygwin/stat.h: Use new dev_t definition throughout. * include/cygwin/types.h: Define __dev16_t and __dev32_t. Define dev_t according to __CYGWIN_USE_BIG_TYPES__ setting. * include/sys/sysmacros.h: Define major, minor and makedev according to __CYGWIN_USE_BIG_TYPES__ setting.
* * syscalls.cc (setegid32): Verify the correctness of the gidCorinna Vinschen2002-06-032-1/+7
| | | | of the group returned by getgrgid32.
* * security.cc (lsa2wchar): Suppressed.Corinna Vinschen2002-06-034-88/+114
| | | | | | | | | | | | | | | | | | | | (get_lsa_srv_inf): Suppressed. (get_logon_server_and_user_domain): Suppressed. (get_logon_server): Essentially new. (get_user_groups): Add "domain" argument. Only lookup the designated server and use "domain" in LookupAccountName. (is_group_member): Simplify the arguments. (get_user_local_groups): Simplify the arguments. Do only a local lookup. Use "BUILTIN" and local domain in LookupAccountName. (get_user_primary_group). Only lookup the designated server. (get_group_sidlist): Remove logonserver argument. Do not lookup any server for the SYSTEM account. (create_token): Delete logonserver and call to get_logon_server. Adjust arguments of get_group_sidlist, see above. * security.h: Delete declaration of get_logon_server_and_user_domain and add declaration of get_logon_server. * uinfo.cc (internal_get_login): Call get_logon_server instead of get_logon_server_and_user_domain.
* * dtable.cc (handle_to_fn): Use largest match for device. CorrectlyChristopher Faylor2002-06-022-8/+37
| | | | (?) deal with remote drive weirdness.
* * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Check specificallyChristopher Faylor2002-06-022-2/+15
| | | | | for non-existent file, first. (fhandler_disk_file::fstat): Perform fd open on files with funny characters.
* * fhandler_process.cc (fhandler_process::open): Set fileid.Christopher Faylor2002-06-023-7/+12
|
* Remove unneeded sigproc.h includes throughout.Christopher Faylor2002-06-0228-107/+83
| | | | | | | | | | | | | * fhandler.h (fhandler_proc::fill_filebuf): Take a pinfo argument. * fhandler_proc.cc (fhandler_proc::get_proc_fhandler): Simplify search for given pid. (fhandler_proc::readdir): Assume that pid exists if it shows up in the winpid list. * fhandler_process.cc (fhandler_process::open): Simplify search for given pid. Call fill_filebuf with pinfo argument. (fhandler_process::fill_filebuf): Pass pinfo here and assume that it exists. * pinfo.h (pinfo::remember): Define differently if sigproc.h is not included. * dll_init.cc (dll_list::detach): Don't run destructor on exit.
* * fhandler.cc (fhandler_base::fstat): Move dev and ino calculation into caller.Christopher Faylor2002-06-026-28/+37
| | | | | | | | * syscalls.cc (stat_worker): Calculate dev and ino calculation here, if zero. * fhandler_proc.cc (fhandler_proc::fhandler_proc): Minor reorg for debugging. * fhandler_process.cc (fhandler_process::exists): Return 0 on nonexistence. (fhandler_process::fstat): Simplify pid logic. * fhandler_tape.cc (fhandler_dev_tape::fstat): Minor reformatting.
* * path.cc (chdir): Don't allow cd'ing to a non-directory virtual path.Christopher Faylor2002-06-012-0/+9
|
* * fhandler_disk_file.cc (readdir): Move inode calculation into caller.Christopher Faylor2002-06-013-35/+59
| | | | | | (fhandler_cygdrive::readdir): Add "." and "..". * dir.cc (readdir): Move inode calculation here so that fhandler readdirs can benefit.
* remove accidentally checked in test version.Christopher Faylor2002-06-011-2/+0
|
* oopsChristopher Faylor2002-05-311-1/+0
|
* (add the rest of the ChangeLog)Christopher Faylor2002-05-311-0/+11
| | | | | | | | | | | * dtable.cc (dtable::init_std_file_from_handle): Default to using binmode derived from path_conv, when required. * fhandler.h (fhandler_base::get_w_binary): Default to binmode if nothing else is specified. * fhandler.h (fhandler_base::get_r_binary): Ditto. * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_handle): Work around g++ warning. * path.cc (path_conv::check): Remove a debugging statement.
* * fhandler_console.cc (fhandler_console::open): Reinstate setting of flags.Christopher Faylor2002-05-317-7/+16
|
* * fhandler_console.cc (fhandler_console::open): Always default to binmode.Christopher Faylor2002-05-312-9/+16
| | | | | | (fhandler_console::write_normal): Don't honor binmode setting. There is already a termios setting for this. (fhandler_console::init): Correct argument order in init call.
* * fhandler.cc (fhandler_base::open): Make default open mode == binmode.Christopher Faylor2002-05-312-7/+14
| | | | (fhandler_base::init): Set open flags based on derived binmode argument.
* * dll_init.cc (dll_list::init): Eliminate unneeded debugging statement.Christopher Faylor2002-05-312-1/+4
|
* * fhandler_proc.cc (fhandler_proc::readdir): Set errno when no more files.Christopher Faylor2002-05-314-3/+13
| | | | | * fhandler_process.cc (fhandler_process::readdir): Ditto. * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
* * path.cc (path_conv::check): Set fileattr to INVALID_FILE_ATTRIBUTES forChristopher Faylor2002-05-312-1/+16
| | | | | | nonexistent virtual device path. (chdir): Set correct errno when attempt is made to cd to nonexistent virtual device path.
* * fhandler_disk_file.cc (fhandler_disk_file::fstat): Always call fstat_by_nameChristopher Faylor2002-05-313-4/+14
| | | | | if fd is not opened to allow fstat_by_name to properly set errno. * fhandler.cc (binmode): Default to binmode when mode is not known.
* * autoload.cc: Replace autoload statments for ZwXXX by NtXXX.Corinna Vinschen2002-05-306-29/+45
| | | | | | | | | | | | | | | | | | Drop ZwQuerySystemInformation since NtQuerySystemInformation was already available. * fhandler_proc.cc (format_proc_uptime): Replace call to ZwQuerySystemInformation by call to NtQuerySystemInformation. (format_proc_stat): Ditto. * fhandler_process.cc (format_process_stat): Replace call to ZwQueryInformationProcess by call to NtQueryInformationProcess. (get_process_state): Ditto. (get_mem_values): Ditto. Replace call to ZwQueryVirtualMemory by call to NtQueryVirtualMemory. * ntdll.h: Cleanup. Drop ZwQuerySystemInformation since NtQuerySystemInformation was already available. Replace declarations of ZwXXX functions by declarations of NtXXX. * pinfo.cc (winpids::enumNT): Replace call to ZwQuerySystemInformation by call to NtQuerySystemInformation.
* speling fxiChristopher Faylor2002-05-301-1/+1
|
* * include/sys/cygwin.h (EXTERNAL_PINFO_VERSION): Reinstate.Christopher Faylor2002-05-293-1/+7
| | | | * external.cc (fillout_pinfo): Use it.
* * external.cc (fillout_pinfo): Use new version define.Corinna Vinschen2002-05-293-2/+11
| | | | | | * include/sys/cygwin.h (external_pinfo): Define EXTERNAL_PINFO_VERSION_16_BIT and EXTERNAL_PINFO_VERSION_32_BIT instead of just EXTERNAL_PINFO_VERSION.
* * external.cc (fillout_pinfo): Set new version field in external_pinfoChristopher Faylor2002-05-293-4/+13
| | | | | | structure. * include/sys/cygwin.h (external_pinfo): Replace strace_file with version field.
* Change internal uid datatype from __uid16_t to __uid32_tCorinna Vinschen2002-05-2917-55/+135
| | | | | | | | | | | | | | | | | | | | throughout. * cygwin.din: Export new symbols getpwuid32, getpwuid_r32, getuid32, geteuid32, setuid32, seteuid32. * passwd.cc (getpwuid32): New function. (getpwuid_r32): Ditto. * syscalls.cc (seteuid32): Ditto. (setuid32): Ditto. * uinfo.cc (getuid32): Ditto. (geteuid32): Ditto. * winsup.h (uid16touid32): New macro, correclt casting from __uid16_t to __uid32_t. (gid16togid32): Ditto fir gids. (getuid32): Declare. (geteuid32): Ditto. (getpwuid32): Ditto. * include/sys/cygwin.h (struct external_pinfo): Add members uid32 and gid32.
* * include/cygwin/socket.h: Protect some symbols against multipleCorinna Vinschen2002-05-296-20/+399
| | | | | | | | | | | definition. * include/netinet/ip.h: Ditto. * include/netinet/tcp.h: Ditto. * include/netinet/ip.h: Replace by BSD derived version of the file. * include/netinet/tcp.h: Ditto. * include/netinet/udp.h: New file. * include/cygwin/ip.h: Remove.
* * dtable.cc (dtable::init_std_file_from_handle): Attempt stronger detection ofChristopher Faylor2002-05-292-43/+61
| | | | | | invalid handle. (handle_to_fn): Detect pathological condition where NT resets the buffer pointer to NULL on an invalid handle.
* clarify changelogChristopher Faylor2002-05-291-1/+2
|
* * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Properly check forChristopher Faylor2002-05-292-1/+10
| | | | | whether we should be opening the file to search for #! characters. Set path_conv structure execability, too, if found.
* * security.cc (set_security_attribute): Call getegid32() instead ofCorinna Vinschen2002-05-283-1/+8
| | | | | getegid(). * include/cygwin/grp.h: Declare getegid32().
* Change internal gid datatype from __gid16_t to __gid32_tCorinna Vinschen2002-05-2815-74/+235
| | | | | | | | | | | | | | | | | | | | | | | throughout. * cygwin.din: Export new symbols chown32, fchown32, getegid32, getgid32, getgrgid32, getgrnam32, getgroups32, initgroups32, lchown32, setgid32, setegid32, getgrent32. * grp.cc (grp32togrp16): New static function. (getgrgid32): New function. (getgrnam32): Ditto. (getgrent32): Ditto. (getgroups32): Change name of internal function from getgroups. (getgroups32): New function. (initgroups32): Ditto. * syscalls.cc (chown32): Ditto. (lchown32): Ditto. (fchown32): Ditto. (setegid32): Ditto. (setgid32): Ditto. * uinfo.cc (getgid32): Ditto. (getegid32): Ditto. * include/cygwin/grp.h: Remove declaration of getgrgid() and getgrnam(). Declare getgrgid32() and getgrnam32() instead. Declare getgid32().
* * autoload.cc (noload): Properly mask low order word for determining number ofChristopher Faylor2002-05-282-1/+6
| | | | bytes to pop.
* * fhandler_disk_file.cc (fhandler_disk_file::fstat): Minor logic cleanup.Christopher Faylor2002-05-282-3/+6
|
* * autoload.cc (LoadFuncEx): Define via new LoadFuncEx2 macro.Christopher Faylor2002-05-2830-913/+1067
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (LoadFuncEx2): Adapted from LoadFuncEx. Provides control of return value for nonexistent function. (NtQueryObject): Declare. (IsDebuggerPresent): Declare via LoadFuncEx2 and always return true if not available. * debug.h (being_debugged): Just rely on IsDebuggerPresent return value. * dtable.cc (handle_to_fn): New function. (dtable::init_std_file_from_handle): Attempt to derive std handle's name via handle_to_fn. (dtable::build_fhandler_from_name): Fill in what we can in path_conv structure when given a handle and path doesn't exist. * fhandler.cc (fhandler_base::open): Don't set the file pointer here. Use pc->exists () to determine if file exists rather than calling GetFileAttributes again. * fhandler.h (fhandler_base::exec_state_isknown): New method. (fhandler_base::fstat_helper): Add extra arguments to declaration. (fhandler_base::fstat_by_handle): Declare new method. (fhandler_base::fstat_by_name): Declare new method. * fhandler_disk_file (num_entries): Make __stdcall. (fhandler_base::fstat_by_handle): Define new method. (fhandler_base::fstat_by_name): Define new method. (fhandler_base:fstat): Call fstat_by_{handle,name} as appropriate. (fhandler_disk_file::fstat_helper): Accept extra arguments for filling out stat structure. Move handle or name specific stuff to new methods above. (fhandler_disk_file::open): Use real_path->exists rather than calling GetFileAttributes again. * ntdll.h (FILE_NAME_INFORMATION): Define new structure. (OBJECT_INFORMATION_CLASS): Partially define new enum. (OBJECT_NAME_INFORMATION): Define new structure. (NtQueryInformationFile): New declaration. (NtQueryObject): New declaration. * path.cc (path_conv::fillin): Define new method. * path.h (path_conv::fillin): Declare new method. (path_conv::drive_thpe): Rename from 'get_drive_type'. (path_conv::volser): Declare new method. (path_conv::volname): Declare new method. (path_conv::root_dir): Declare new method. * syscalls.cc (fstat64): Send real path_conv to fstat as second argument.
* * security.cc (lsa2str): New function.Corinna Vinschen2002-05-272-2/+15
| | | | (get_priv_list): Call lsa2str instead of sys_wcstombs.
* * syscalls.cc (seteuid): Do not take allow_ntsec into account.Corinna Vinschen2002-05-272-242/+225
| | | | | | | | Attempt to use an existing or new token even when the uid matches orig_uid, but the gid is not in the process token. Major reorganization after several incremental changes. (setegid): Do not take allow_ntsec into account. Minor reorganization after several incremental changes.
* * debug.h (being_debugged): New macro.Christopher Faylor2002-05-275-2/+16
| | | | | | | * dtable.cc (dtable::extend): Use new macro. * exceptions.cc (try_to_debug): Ditto. * strace.cc (strace::hello): Only output debugging info when we think we're being debugged.
* * winsup.h: Remove duplicate declarations of malloc_lock and malloc_unlock.Christopher Faylor2002-05-272-3/+5
|
* update commentChristopher Faylor2002-05-271-1/+1
|
* Remove unneeded sync.h, where appropriate, throughout. Remove unneeded heap.h,Christopher Faylor2002-05-2536-42/+7
| | | | | | where appropriate, throughout. Remove unneeded exceptions.h, where appropriate, throughout. Remove unneeded perprocess.h, where appropriate, throughout.
* * security.cc (create_token): Call __sec_user() instead ofCorinna Vinschen2002-05-242-4/+11
| | | | | sec_user() to remove dependence on allow_ntsec. Verify that the returned sd is non-null.
* 2002-05-25 Robert Collins <rbtcollins@hotmail.com>Robert Collins2002-05-242-1/+10
| | | | * gmon.c (fake_sbrk): Correctly return -1 on failed malloc's.