summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler.cc
Commit message (Collapse)AuthorAgeFilesLines
* * fork.cc (fork_child): Call the __pthread_atforkchild function.Christopher Faylor2001-04-131-3/+2
| | | | | | | | | | | | (fork_parent): Call the __pthread_atforkparent function. * cygwin.din: Export pthread_atfork. * thread.h (callback): New class. (MTinterface): Use it. * thread.cc (__pthread_atforkprepare): New function. (__pthread_atforkparent): New function. (__pthread_atforkchild): New function. (__pthread_atfork): New function. * pthread.cc (pthread_atfork): New function.
* * dir.cc (mkdir): Check for case clash.Corinna Vinschen2001-04-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | * environ.cc: Add extern declaration for `pcheck_case'. (check_case_init): New function. (struct parse_thing): Add "check_case" option. * errno.cc (_sys_nerrlist): Add text for ECASECLASH. (strerror): Add case branch for ECASECLASH. * fhandler.cc (fhandler_disk_file::open): Check for case clash. * path.cc: Add global variable `pcheck_case'. (struct symlink_info): Add member `case_clash' and method `case_check'. (path_prefix_p_): Call `pathnmatch' instead of `strncasematch'. (pathnmatch): New funtion. (pathmatch): Ditto. (path_conv::check): Add handling for case checking. (symlink): Check for case clash. (symlink_info::check): Add parameter for case checking. Handle case checking. (symlink_info::case_check): New method. (chdir): Don't use unconverted path if pcheck_case==PCHECK_STRICT. * path.h: Add extern declarations for `pathmatch' and `pathnmatch'. (enum case_checking): New enumeration type describing the case checking behaviour of path conversion routines. (class path_conv): Add member `case_clash'. * syscalls.cc (_link): Check for case clash.
* * fhandler.cc (fhandler_disk_file::open): Avoid checking a magicCorinna Vinschen2001-04-021-0/+1
| | | | number of a directory.
* * fhandler.cc (fhandler_base::read): Remove special handling of CTRL-Z.Christopher Faylor2001-03-311-1/+3
|
* * fhandler.cc (fhandler_disk_file::fstat): Add correct modes toCorinna Vinschen2001-03-131-1/+1
| | | | symlinks when stat'ing on FAT or FAT32 file systems.
* * dlopen.c (dlopen): Return NULL when name is NULL (suggested byChristopher Faylor2001-03-051-23/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | chrisiasci@aol.com). * cygwin.din: Add a new, internally used export - _check_for_executable. * dcrt0.cc (dll_crt0_1): Set _check_for_executable for older binaries. Pass user_data to premain functions. * fhandler.cc (fhandler_disk_file::open): Only check for executable if the linked program is intereested in the executable bit. (fhandler_disk_file::check_execable_p): Delete. * fhandler.h (executable_states): New enumeration of various states of executable bit caring. (fhandler_base::set_execable_p): New method. * fhandler_termios.cc (fhandler_termios::line_edit): Flag when a signal has been sent to the tty. Return -1 when this is so. * fhandler_console.cc (fhandler_console::read): Return -1 when signal sending character encountered. * path.cc (path_conv::check): Record when path refers to a disk device. Move executable extension check here. (check_sysfile): Accomodate new EXEC path states. (has_suffix): Remove. (next_suffix): Remove. (class suffix_scan): New clas. (suffix_scan::has): New method. (suffix_scan:next): New method. (symlink_info::check): Use suffix_scan method to control for scanning for suffixes. * path.h (path_conv::exec_state): New method. * perprocess.h: Make "C" friendly. * include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_S_IEXEC. Bump CYGWIN_VERSION_API_MINOR. * include/sys/cygwin.h: Change premain declarations. * winsup.h: Move __cplusplus test to after builtin defines.
* * cygerrno.h: Revert previous patch.Corinna Vinschen2001-02-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | * errno.cc: Ditto. * dir.cc: Eliminate `dir_suffixes'. (opendir): Remove usage of `dir_suffixes'. (rmdir): Ditto. * fhandler.cc (fhandler_disk_file::open): Remove usage of `inner_suffixes'. * path.cc: Rename `inner_suffixes' to `lnk_suffixes'. (path_conv::check): Remove usage of `inner_suffixes'. (symlink): Ditto. (symlink_info::check): Handle checking for `.lnk' in path_conv exclusively here. (chdir): Remove usage of `dir_suffixes'. * shortcut.c: Eliminate debug_printf lines. (check_shortcut): Don't set error except on failing ReadFile. * spawn.cc: Remove ".lnk" from `std_suffixes'. * syscalls.cc (_unlink): Remove usage of `inner_suffixes'. Remove ".lnk" from `stat_suffixes'. (_rename): Add check for renaming a symlink to keep the ".lnk" suffix after renaming.
* * fhandler.cc (fhandler_disk_file::open): Use `inner_suffixes' whenCorinna Vinschen2001-02-221-1/+3
| | | | | resolving real_path. * path.cc (symlink): Ditto for win32_topath.
* Add copyright year 2001Corinna Vinschen2001-02-211-1/+1
|
* * Makefile.in: Add `-lshell32 -luuid' to link pass for new-cygwin1.dll.Corinna Vinschen2001-02-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * autoload.cc: Add LoadDLLinitfunc for ole32.dll. Add LoadDLLfuncEx statements for CoInitialize@4, CoUninitialize@0 and CoCreateInstance@20. * dir.cc (dir_suffixes): New datastructure. (readdir): Check for R/O *.lnk files to hide the suffix. (opendir): Use `dir_suffixes' in path conversion. (rmdir): Ditto. * fhandler.cc (fhandler_disk_file::fstat): Add S_IFLNK flag before calling `get_file_attribute'. Take FILE_ATTRIBUTE_READONLY into account only if the file is no symlink. * path.cc (inner_suffixes): New datastructure. (SYMLINKATTR): Eliminated. (path_conv::check): Use `inner_suffixes' on inner path components. (shortcut_header): New global static variable. (shortcut_initalized): Ditto. (create_shortcut_header): New function. (cmp_shortcut_header): Ditto. (symlink): Create symlinks by creating windows shortcuts. Preserve the old code. (symlink_info::check_shortcut): New method. (symlink_info::check_sysfile): Ditto. (symlink_info::check): Check for shortcuts. Move code reading old system attribute symlinks into symlink_info::check_sysfile(). (chdir): Use `dir_suffixes' in path conversion. * security.cc (get_file_attribute): Check for S_IFLNK flag. Force 0777 permissions then. * spawn.cc (std_suffixes): Add ".lnk" suffix. * syscalls.cc (_unlink): Use `inner_suffixes' in path conversion. Check for shortcut symlinks to eliminate R/O attribute before calling DeleteFile(). (stat_suffixes): Add ".lnk" suffix. (stat_worker): Force 0777 permissions if file is a symlink.
* * fhandler.cc (fhandler_base::open): Always add GENERIC_READ accessCorinna Vinschen2001-02-051-0/+6
| | | | | | | | | | when opening raw disk devices. * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Implement bytewise access. * fhandler_raw.cc (fhandler_dev_raw::open): Always open raw disk device binary. (fhandler_dev_raw::raw_write): Don't drop read buffer content when writing after read.
* * environ.cc (struct parse_thing): Add entry for new CYGWIN optionCorinna Vinschen2000-12-191-1/+0
| | | | | | | | | | | `smbntsec'. * path.cc (path_conv::check): Check path for being a remote path. If so and `allow_smbntsec' is set to FALSE, set has_acls to FALSE. * security.cc: Add global definition for `allow_smbntsec'. * security.h: Add extern declaration for `allow_smbntsec'. * fhandler.cc (fhandler_disk_file::open): Eliminate extern declaration of `allow_ntsec'. * syscalls.cc: Ditto.
* * fhandler.cc (fhandler_disk_file::open): Check for buggy CreateFileCorinna Vinschen2000-11-281-0/+15
| | | | | | | | | condition. * path.cc (path_conv::check): Get file system type in call to GetVolumeInformation to check for file systems with buggy CreateFile. * path.h (enum path_types): Add PATH_HASBUGGYOPEN. (class path_conv): Add methods `has_buggy_open' and `set_has_buggy_open'.
* * fhandler.cc (is_at_eof): New function.Christopher Faylor2000-11-261-0/+23
| | | | | | (fhandler_base::raw_read): Detect special case where last error == ERROR_NOACCESS but the file is at EOF. Most UNIXes do not consider this to be an error.
* * pinfo.cc (pinfo::init): Reverse order of setting status and pid info in anChristopher Faylor2000-11-031-11/+11
| | | | | | | | execed process to avoid a race. * sigproc.cc (wait_subproc): Print more info when a WFSO error occurs. * automode.c: New file. * syscalls.cc (close_all_files): Streamline slightly. * cygheap.cc (ccalloc): Clear *entire* allocated array.
* * path.h (has_exec_chars): Standard function for checking for executable magicChristopher Faylor2000-10-311-2/+1
| | | | | | numbers. * path.cc (symlink_info::check): Use the above function. * fhandler.cc (fhandler_disk_file::open): Ditto.
* * fhandler.cc (fhandler_base::fcntl): Treat O_NONBLOCK and OLD_O_NDELAYCorinna Vinschen2000-10-251-2/+7
| | | | | as exactly the same. If one is set, both are set. * net.cc (fhandler_socket::fcntl): Ditto.
* * fhandler.cc (fhandler_base::fcntl): Behave properly when passedCorinna Vinschen2000-10-241-5/+6
| | | | | | previous version of O_NDELAY. * syscalls.cc: Move OLD_O_NDELAY to winsup.h. * winsup.h: Define OLD_O_NDELAY now.
* * fhandler.cc (fhandler_base::fcntl): Setting flags in F_SETFLCorinna Vinschen2000-10-231-12/+13
| | | | branch according to Linux documentation.
* * fcntl.cc (_fcntl): Rearrange as wrapper function. Move allCorinna Vinschen2000-10-231-0/+44
| | | | | | | | functionality except F_DUPFD to fhandler classes. * fhandler.cc (fhandler_base::fcntl): New method. * net.cc (fhandler_socket::fcntl): Ditto. * fhandler.h (class fhandler_base): Add method prototype for fcntl(). (class fhandler_socket): Ditto.
* * fork.cc (fork): Set sigframe here, since it can pause for a considerableChristopher Faylor2000-10-231-1/+0
| | | | | | | amount of time. * environ.cc (_addenv): Add debugging. * fhandler.cc: Eliminate unneeded include. * smallprint.c: Ditto.
* * times.cc (to_time_t): pass zero time as epochDJ Delorie2000-10-201-0/+6
| | | | * fhandler.cc (fstat): copy atime/ctime from mtime if they're zero
* * Makefile.in: Remove some obsolete stuff.Christopher Faylor2000-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dcrt0.cc (dll_crt0_1): Call signal_fixup_after_exec where appropriate. Set myself->uid from parent version. Just use ThreadItem Init method. Close or store hexec_proc as appropriate. (_dll_crt0): Store user_data->forkee here so that proper tests can be made subsequently. (do_exit): Remove hExeced stuff. * environ.cc (environ_init): Accept environ count as well as environ pointer. * environ.h: Reflect above change. * pinfo.cc (pinfo_init): Ditto. Accept environ count. (fixup_in_spawned_child): Remove. * spawn.cc (spawn_guts): Move signal code to dll_crt0_1. Don't suspend execing process since it is no longer necessary. Store envc. * exceptions.cc (signal_fixup_after_exec): New function. (call_handler): Remove hExeced test. * child_info.h (cygheap_exec_info): Store envc as well as envp. (child_info_spawn): Store hexec_proc so that it can be closed in child. * path.cc (normalize_posix_path): Avoid intermediate use of temporary cwd buf. (normalize_win32_path): Ditto. (cwdstuff::get_initial): Always set lock. * sigproc.h: Remove hExeced. * strace.cc (strace::vsprntf): Modify to accomodate for lack of hExeced. * thread.cc (MTinterface::Init): Merge Init1 and ClearReent into this method. (MTinterface::Init1): Eliminate. (MTinterface::ClearReent): Eliminate. * thread.h: Reflect above changes. * include/sys/strace.h (strace): Make microseconds() public. Make various functions 'regparm', throughout. * pinfo.h (_pinfo): Inline simple signal manipulation functions. Requires inclusion of thread.h which was removed from .cc files, where appropriate. throughout. * pinfo.cc: Eliminate signal manipulation functions. (_pinfo::exit): Calculate total rusage for exiting process here. * cygheap.cc (size2bucket): Eliminate. (init_buckets): Ditto. (_cmalloc): Calculate size and bits in a loop rather than going through a function call. (_crealloc): Use stored array index to calculate allocated size. * spawn.cc (spawn_guts): Use _pinfo exit method to exit, calculating cpu usage.
* * errno.cc (seterrno_from_win_error): Fix debugging output.Christopher Faylor2000-10-121-14/+0
| | | | | | | | | | | | | | * fhandler.cc (fhandler_base::fstat): Move to inline method in fhandler.h. (fhandler_base::set_io_handle): Ditto. * fhandler.h (fhandler_base): Make some methods inline. * fhandler_console.cc (fhandler_console::write_normal): Make buffer larger. * sigproc.h (sigframe::sigframe): Actually use set ebp parameter correctly. * spawn.cc (spawn_guts): Set dwProcessId when exec'ing. Just exit immediately after reparenting. * syscalls.cc: Sprinkle sigframe stuff throughout. * wait.cc (wait4): Set signal frame here. * dcrt0.cc (__api_fatal): Don't rely on small_printf to display errors. Always display problems to the console, if possible.
* * fhandler.h (fhandler_base): Remove obsolete _rpos and _rsize elements.Christopher Faylor2000-10-071-91/+39
| | | | | | | | | | | * fhandler.cc (fhandler_base::open): Ditto. * fhandler.cc (fhandler_base::fhandler_base): Ditto. (fhandler_base::read): Ditto. Add more debugging output. Don't issue a \r when \r\n detected. * pipe.cc (make_pipe): Streamline slightly. Make debug output more interesting. * strace.cc (strace::vsprintf): Use __progname where appropriate to distinguish strace output when exec'ing.
* Break out more header info into separate files. Use appropriate header filesChristopher Faylor2000-09-081-1/+5
| | | | | | | | | | | | throughout. * shared.h: Remove. * cygwin_version.h: New file. * delqueue.h: New file. * environ.h: New file. * host_dependent.h: New file. * perprocess.h: New file. * registry.h: New file. * security.h: New file.
* Split out tty and shared_info stuff into their own headers and use throughout.Christopher Faylor2000-09-071-0/+2
| | | | | | | | | | | | | | | | | Include sys/termios.h for files which need it. * tty.h: New file. * shared_info.h: New file. * fhandler.h: Move inline methods that rely on tty stuff to fhandler_console.cc. * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set output_done_event immediately after reading data to speed up tty output processing. (process_output): Set write_error to errno or zero. (fhandler_tty_slave::write): Check previous write error prior to writing to slave end of pipe. This allows tty output to be slightly less synchronous. * fhandler_console.cc (fhandler_console::tcsetpgrp): Moved here from fhandler.h. (fhandler_console::set_input_state): Ditto.
* * Makefile.in: Add cygheap.o.Christopher Faylor2000-09-031-46/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * child_info.h: Add specific exec class. * cygheap.h: New file. Contains declarations for cygwin heap. * cygheap.cc: New file. Implements cygwin heap functions. * dcrt0.cc (quoted): Simplify due to new method for passing arguments between cygwin programs. (alloc_stack_hard_way): Attempt to handle overlapped stack. (dll_crt0_1): Move child_info processing here. Accomodate new method for passing arguments between cygwin programs. Initialize cygwin heap. Establish __argc and __argv variables. (_dll_crt0): Move most of child_info processing to dll_crt0_1. (cygwin_dll_init): Remove duplication. * dtable.cc (dtable::extend): Allocate dtable using cygwin heap. (dtable::build_fhandler): Ditto for fhandler type being constructed. (dtable::dup_worker): Free new fhandler from cygwin heap on error. (dtable::select_*): Don't assume that this == fdtab. (dtable::linearize_fd_array): Delete. (dtable::delinearize_fd_array): Delete. (dtable::fixup_after_exec): New file. (dtable::vfork_child_dup): Use cygwin heap. (dtable::vfork_parent_restore): Ditto. * dtable.h: Remove obsolete methods. Add new method. * environ.cc (posify): Eliminate already_posix parameter and logic. (envsize): New function. (_addenv): Use envsize. (environ_init): Accept an argument pointing to an existing environment list. If supplied, allocate space for this in the the program's heap. * fhandler.cc (fhandler_base::operator =): Move here from fhandler.h. Use cygwin heap to allocate filenames. (fhandler_base::set_name): Allocate/free names from cygwin heap. (fhandler_base::linearize): Delete. (fhandler_base::de_linearize): Delete. (fhandler_base::operator delete): Free from cygwin heap. (fhandler_base::~fhandler_base): Ditto. * fhandler.h: Accomodate elimination of *linearize and other changes above. * fhandler_console.cc (fhandler_console::fixup_after_exec): Rename from de_linearize. * heap.h: New file. * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Use cygwin heap for name. fhandler_tty::fixup_after_exec): Rename from de_linearize. * fork.cc (fork): Call cygheap_fixup_in_child. * heap.cc: Use declarations in heap.h. * malloc.cc: Sprinkle assertions throughout to catch attempts to free/realloc something from the cygwin heap. * path.cc: Throughout, eliminate use of per-thread cache for cwd. Use cwd_* functions rather than cwd_* variables to access cwd_win32 and cwd_posix. (cwd_win32): New function. (cwd_posix): New function. (cwd_hash): New function. (cwd_fixup_after_exec): New function. * path.h: Accomodate path.cc changes. * pinfo.cc (pinfo_init): Accept a pointer to an environment table. Pass this to environ_init. Eliminate old 'title' tests. * pinfo.h: Accomodate above change in argument. * spawn.cc (struct av): New method for building argv list. (av::unshift): New method. (spawn_guts): Allocate everything that the child process needs in the cygwin heap and pass a pointer to this to the child. Build argv list using new method. Eliminate delinearize stuff. * thread.h: Eliminate _cwd_win32 and _cwd_posix buffers. * winsup.h: Eliminate obsolete functions. Add envsize() declaration.
* * environ.cc (parse_thing): nobinmode should force O_TEXT.Christopher Faylor2000-08-241-2/+2
| | | | | | | | (regopt): Use correct path to find LOCAL_MACHINE registry options. * fhandler.cc (fhandler_base::open): Set binary mode only when binmode == O_BINARY. * pipe.cc (pipe): Pipe handling should rely on binmode not _fmode now that the two are different.
* * winsup.h: Eliminate inclusion of most of the cygwin .h files. Use .h filesChristopher Faylor2000-08-221-0/+2
| | | | | only in sources which require them. * Makefile.in: Generate dependencies with -MD option.
* * cygerrno.h: New file. Use this throughout whenever errno manipulation isChristopher Faylor2000-08-221-0/+1
| | | | | | | | | | | | | | | required. * errno.cc: Use DWORD to hold Windows errors. (geterrno_from_win_error): New function. (seterrno_from_win_error): Use geterrno_from_win_error to convert supplied windows error (suggested by Corinna Vinschen). * path.cc (symlink_info): Add error element. * path.cc (path_conv::check): Remove errno setting. Use new symlink_info errno element to set path_conv error, where appropriate. (symlink_info::check): Set error element rather than attempting to manipulate errno. Add more checks for trailing / and /.. even though they are currently useless. Avoid setting EINVAL. * path.cc (normalize_posix_path): Correct check for trailing /.
* * winsup.h: Change strchr inline for strange gcc problem.Christopher Faylor2000-08-101-0/+1
| | | | * select.cc (select_stuff::wait): Bounds check w4 array.
* * dir.cc (readdir): Ensure that errno is *only* set when we've run out ofChristopher Faylor2000-08-101-4/+2
| | | | | | filenames. * fhandler.cc (fhandler_disk_file::fstat): Use modern method for saving errno, making it effective for the whole function.
* * winsup.h: take out protections of environ, errno, allow C useDJ Delorie2000-08-021-1/+1
| | | | | | | | | | * *.cc: put winsup.h before other headers (for __INSIDE_CYGWIN__); use cur_environ() instead of just environ * times.cc: remove import protections * glob.c: add winsup.h * localtime.c: ditto * smallprint.c: ditto * Makefile.in: don't __INSIDE_CYGWIN__ as it messes up profiling.
* * fhandler.cc (fhandler_disk_file::fstat): Allow block calculation to succeedChristopher Faylor2000-07-271-1/+1
| | | | for files >= 2GB and <= 4GB.
* Throughout, eliminate third argument to path_conv and use new PC_* constantsChristopher Faylor2000-07-171-1/+2
| | | | | | | | | | | | | | | | | | for second argument. * path.h: Generalize SYMLINK_* constants to PC_*. (path_conv): Create a new method. Fold third argument into second. * dll_init.cc (dll_list::alloc): Try harder to find space to allocate dll struct. (dll_dllcrt0): Don't check sanity if we've already called dll_crt0. * path.cc (path_conv::check): Don't check for a null or empty path unless specifically told with a flag setting. (check_null_empty_path): New function, adapted from macro. * syscalls.cc (_rename): Use already-determined file attributes rather than checking again. * lib/cygwin/cygwin_attach.dll.c (cygwin_attach_dll): Use a static per_process structure since this is apparently supposed to be zeroed. * lib/cygwin_crt0.c (cygwin_crt0): Zero per_process structure sent to older DLLs.
* Slight optimization.Christopher Faylor2000-07-091-1/+1
|
* * cygwin.din: Export _getmode and getmode to allow querying of binary state ofChristopher Faylor2000-07-091-6/+33
| | | | | | | | | | | | | | | an fd. * external.cc (cygwin_internal): Add handling of perfile_table setting. * fhandler.cc (perfile_table): New global. (fhandler_base::get_default_fmode): New method to return a file's default mode based on its name. (fhandler_base::open): Use get_default_mode method to determine a file's mode. Record file mode in file flags. * fhandler.h (fhandler_base): Declare get_default_fmode * syscalls.cc (getmode): New function. * sys/cygwin.h (__cygwin_perfile): New structure. (cygwin_getinfo_types): Move outside of WINVER conditional. (per_process): Move inside of WINVER conditional.
* * Makefile.in: Use variables rather than configure constructs whereChristopher Faylor2000-07-011-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | appropriate. (LIBCOS): Find additional stub library stuff in their own subdirectory. * dcrt0.cc: Convert user_data pointer to static __cygwin_user_data area. (do_global_ctors): Check magic_bisquit for initialization. (dll_crt0_1): First group of premain functions prior to fd initialization. Run second group before calling main. (dll_crt0 ()): New function, called from new initialization code. (dll_crt0 (per_process *uptr)): Call new dll_crt0 () function on initialization. * debug.cc (thread_stub): Initialize bottom of stack with per-thread info. * environ.cc (parse_thing): Use binmode global to control CYGWIN=binmode behavior. * fhandler.cc (fhandler_base::open): Allow explicit setting of __fmode to O_BINARY or O_TEXT to override disk mount settings. * libcmain.cc: Move to lib subdirectory. * libccrt0.cc: Ditto. * dll_main.cc: Ditto. * dll_entry.cc: Ditto. * getopt.c: Ditto. * thread.cc (thread_init_wrapper): Call ExitThread explicitly rather than returning, as a preliminary step towards placing per thread info at the bottom of the stack. * winsup.h: Move per_process class to include/sys/cygwin.h. Declare new dll_crt0(). * include/cygwin/version.h: Bump API minor version. * binmode.c: New file. * textmode.c: Ditto. * lib/_cygwin_crt0_common.cc: Ditto. * lib/crt0.h: Ditto. * lib/cygwin_attach_dll.c: Ditto. * lib/cygwin_crt0.c: Ditto. * lib/dll_entry.cc: Ditto. * lib/dll_main.cc: Ditto. * lib/getopt.c: Ditto. * lib/libcmain.c: Ditto. * lib/premain0.c: Ditto. * lib/premain1.c: Ditto. * lib/premain2.c: Ditto. * lib/premain3.c: Ditto.
* * fhandler.h (set_name): Don't use 'unix' as name since this is defined by gccChristopher Faylor2000-06-181-5/+5
| | | | | now. * fhandler.cc (set_name): Ditto.
* * fhandler.cc (fhandler_disk_file::open): Check for directoryCorinna Vinschen2000-06-081-0/+4
| | | | to set O_DIROPEN on directories anyway.
* * fhandler.cc (fhandler_disk_file::open): Check for executableCorinna Vinschen2000-05-311-2/+3
| | | | even if ntsec is on if filesystem doesn't support ACLs.
* * fhandler.cc (fhandler_base::puts_readahead): ChangeCorinna Vinschen2000-05-091-2/+2
| | | | while condition to disallow wild runs.
* * fhandler.cc (lock): use signed math to allow checking rangesDJ Delorie2000-05-081-8/+9
| | | | properly.
* * dcrt0.cc (insert_file): Eliminate unused parameter.Christopher Faylor2000-05-071-1/+8
| | | | | | | | | | (build_argv): Ditto. * exceptions.cc (stack): Eliminate unused parameters. (stackdump): Ditto. (cygwin_stackdump): Reflect above changes. (sig_handle): Ditto. * fhandler.cc (fhandler_base::set_inheritance): Use kludge to avoid unused parameter warning.
* * fhandler.cc (fhandler_disk_file::open): Check for allow_ntsecCorinna Vinschen2000-04-251-1/+2
| | | | | | | | | | | | | when determining exec flag. * path.cc (symlink_info::check): Remove call to get_file_attribute(). * security.cc (read_sd): Rename, ditto for variables to conform to common naming convention. Use GetFileSecurity() instead of BackupRead() to avoid permission problems when reading ACLs. (write_sd): Same renaming as for read_sd(). (alloc_sd): Change default permissions according to Linux permissions for group and world when write permission is set. * syscalls.cc (stat_worker): Avoid different permission problems when requesting file informations.
* * fhandler.h (fhandler_base::hclose): New virtual method.Christopher Faylor2000-04-201-4/+5
| | | | | | | (fhandler_base::set_inheritance): Make this a method so that we can use the appropriate close methods. * fhandler.cc (fhandler_base::set_inheritance): Ditto. * path.cc (normalize_posix_path): Eliminate /. trailing path component.
* * fhandler.cc (fhandler_disk_file::fstat): Allocate enough space for root dirChristopher Faylor2000-04-081-2/+3
| | | | determination or overflow an array.
* * fhandler.cc (fhandler_base::open): Call set_file_attribute() only if a ↵Corinna Vinschen2000-03-171-1/+3
| | | | file is really created.
* * security.cc (set_process_privileges): Removed `static'.Corinna Vinschen2000-03-161-51/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (get_nt_attribute): Returns uid and gid additionally. Removed call to set_process_privileges(). (get_file_attribute): Returns uid and gid additionally. Don't call ntea if ntsec is ON. (set_nt_attribute): Removed call to set_process_privileges(). Don't call ntea if ntsec is ON. (acl): Removed call to set_process_privileges(). * dcrt0.cc (dll_crt0_1): Calls set_process_privileges() now. * winsup.h: New prototype for set_process_privileges(), changed prototype for get_file_attribute(). * fhandler.cc (get_file_owner): Discarded. (get_file_group): Ditto. (fhandler_disk_file::fstat): Discard calls to get_file_owner() and get_file_group(). * path.cc (path_conv::path_conv): Added debugging output for result of GetVolumeInformation(). (mount_info::conv_to_win32_path): Call backslashify() with pathbuf instead of src_path. * syscalls.cc (chown): Reformatted. (chmod): Replace get_file_owner() and get_file_group() calls by a call to get_file_attribute(). Discard local variable has_acls. Slightly reformatted. (stat_worker): Replaced idiot's (it's me) root dir check by call to rootdir(). Don't call num_entries() on remote drives. Discard local variable has_acls.