Commit Graph

267 Commits

Author SHA1 Message Date
Corinna Vinschen 7a87f0326b * fhandler.cc (fhandler_base::puts_readahead): Change
while condition to disallow wild runs.
2000-05-09 21:55:11 +00:00
DJ Delorie c469b6a2b0 * fhandler.cc (lock): use signed math to allow checking ranges
properly.
2000-05-08 16:13:54 +00:00
Christopher Faylor eafa31fb9f * dcrt0.cc (insert_file): Eliminate unused parameter.
(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.
2000-05-07 03:29:08 +00:00
Corinna Vinschen d6581f44d4 * fhandler.cc (fhandler_disk_file::open): Check for allow_ntsec
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.
2000-04-25 16:31:14 +00:00
Christopher Faylor d7aac2acf5 * fhandler.h (fhandler_base::hclose): New virtual method.
(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.
2000-04-20 04:38:10 +00:00
Christopher Faylor af3e5ed279 * fhandler.cc (fhandler_disk_file::fstat): Allocate enough space for root dir
determination or overflow an array.
2000-04-08 04:47:15 +00:00
Corinna Vinschen 2be36bd9c4 * fhandler.cc (fhandler_base::open): Call set_file_attribute() only if a file is really created. 2000-03-17 17:22:53 +00:00
Corinna Vinschen 5d4af61e5d * security.cc (set_process_privileges): Removed `static'.
(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.
2000-03-16 19:35:18 +00:00
Christopher Faylor 332600d80c Pipe changes throughout suggested by Eric Fifer <EFifer@sanwaint.com>
* debug.cc (threadname_init): Pass name of lock as arg 2 of new_muto.
* malloc.cc (malloc_init): Ditto.
* sigproc.cc (sigproc_init): Ditto.
* exceptions.cc (events_init): Ditto.
(call_handler): Eliminate special case for hExeced.  Report locked thread in
debugging output.
* fhandler.cc (fhandker_pipe::fhandler_pipe): Propagate device type to base
class.
* fhandler.h (fhandler_pipe): Ditto.
* hinfo.cc (hinfo::build_fhandler): Pass specific type of pipe to constructor.
* spawn.cc (spawn_guts): Eliminate dependency on signal when waiting for
subprocess.
* strace.cc: Remove obsolete #ifdef.
* sync.cc (muto::muto): Save the name of the muto.
(muto:~muto): Also release the muto.
* sync.h: Add a muto name field.
* select.cc (peek_pipe): Avoid doing a PeekNamedPipe on the write end of a
pipe.
2000-03-15 04:49:36 +00:00
Christopher Faylor 3f0b493540 * fhandler.cc (fhandler_base::get_readahead_into_buffer): New function.
* fhandler.h: Declare new function.  Add extra argument to
process_slave_output.
* fhandler_console.cc (fhandler_console::read): Move read ahead code to new
function.
* fhandler_tty.cc (fhandler_pty_master::process_slave_output): Move common code
here.
(fhandler_tty_slave::read): Understand readahead.
(fhandler_pty_master::read): Move code to process_slave_output.
* select.cc (peek_pipe): Avoid performing certain checks when non-read and on
inappropriate fh types.
2000-03-12 06:29:54 +00:00
Christopher Faylor 5abc9b830b Throughout use strace class in place of individual functions and variables.
* cygwin.din: Eliminate _strace_wm.
* sigproc.cc (wait_sig): Temporarily add more debugging output.
* include/cygwin/version.h: Bump minor api to reflect export change.
2000-03-07 05:33:09 +00:00
Christopher Faylor 5d25dcfa3b Remove unneeded include. 2000-02-26 01:13:02 +00:00
Christopher Faylor 8656ee07ef * exceptions.cc (interruptible): Make a little more structured.
(call_handler): Allow signals to be sent even if signalled thread is stopped.
Change order of signal_arrived arming/waiting threads clearing to eliminate a
race.
(reset_signal_arrived): New helper function.
* malloc.cc (malloc_init): Use mutos so that signal handler can keep track of
who owns the lock.
(__malloc_lock): Ditto.
(__malloc_unlock): Ditto.
* sync.h (new_muto): Actually use a muto for the "buffer".
* Makefile.in: Fix a dependency.
2000-02-26 01:11:54 +00:00
Christopher Faylor c90d620db8 * fhandler.cc (set_inheritance): Revert previous patch which got rid of 'name'
parameter.
2000-02-21 23:38:57 +00:00
Christopher Faylor 9cec3d45aa Respond to a multitude of g++ warnings. 2000-02-21 05:20:38 +00:00
Corinna Vinschen 486e3de201 *** empty log message *** 2000-02-21 00:31:55 +00:00
Christopher Faylor 1fd5e000ac import winsup-2000-02-17 snapshot 2000-02-17 19:38:33 +00:00