summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
Commit message (Collapse)AuthorAgeFilesLines
* * Makefile.in: Just use library files from this tree when building cygrun.exe.Christopher Faylor2000-06-161-2/+2
| | | | | * path.cc (chdir): Don't set cache to offending chdir. Change comment to reflect current reality.
* * path.cc (chdir): Don't set cache to offending chdir. Change comment toChristopher Faylor2000-06-151-8/+10
| | | | reflect current reality.
* Fix typo.Christopher Faylor2000-06-151-1/+1
|
* * path.cc (normalize_posix_path): Convert path to POSIX if it seems to be aChristopher Faylor2000-06-151-19/+35
| | | | Windows path.
* * path.cc (mount_info::add_item): The previous patch can't handle the case ofChristopher Faylor2000-06-131-6/+8
| | | | overwriting a mount entry.
* * thread.h: Shorten "current_directory" variables to "cwd_*" throughout.Christopher Faylor2000-06-131-42/+40
| | | | | | | * path.cc: Ditto. (normalize_posix_path): Add some extra debugging info. (chdir): Ditto. Store chdir'ed posix and MS-DOS directory names in "cache" here rather than trying to derive them later.
* * path.cc (path_conv::check): Erase two lines checked inCorinna Vinschen2000-06-081-2/+0
| | | | by mistake.
* path.cc (mount_info::init): Eliminate the mount_slash feature.Corinna Vinschen2000-06-081-138/+68
| | | | | | | | | | | | | | | | | (mount_slash): Eliminated. (mount_info::read_mounts): Eliminate looking up existing entries. The loop for deleting cygpath entries is done only when such entries exist. (mount_info::from_registry): Eliminate sorting. (mount_info::add_item): Call add_reg_mount if necessary. Check nmounts more precisely. Use strcasematch in looking up existing entries. (mount_info::del_item): Call del_reg_mount if necessary. Use strcasematch. Use memmove instead of memcpy. (mount_info::import_v1_registry): Everything is done in this method. (mount_info::to_registry): Eliminated. (mount_info::from_v1_registry): Eliminated. (cygwin_umount): Simply call del_item. shared.h: Modify the declaration of add_item and del_item. Remove the declaration of from_v1_registry.
* * cygwin.din: add cygwin_dll_initDJ Delorie2000-06-081-0/+3
| | | | | | * dcrt0.cc (cygwin_dll_init): new (dll_crt0_1): short circuit if manually loaded * path.cc (mount_info::init): don't init if manually loaded
* * path.cc (mount_info::conv_to_win32_path): Previous patch was too aggressiveChristopher Faylor2000-05-301-4/+6
| | | | in adding a trailing slash.
* * Makefile.in: Remove libadvapi32.a.Christopher Faylor2000-05-301-26/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * autoload.h: Add additional field to autoload block for handling unimplemented functions. (LoadDLLfuncEx): New function which accepts additional parameter for controlling unimplemented function behavior. (LoadDLLfunc): Use LoadDLLfuncEx. * dcrt0.cc: Use new arguments for LoadDLLfunc. Add advapi32 routines. (noload): Rewrite in assembler. Handle new unimplemented function type. * exceptions.cc: Eliminate another vestige of StackWalk stuff. * net.cc: Use new arguments for LoadDLLfunc. * uinfo.cc: Ditto. * config.h.in: Remove obsolete define. * path.h (isdrive): New macro. * dcrt0.cc (globify): Use new macro to determine if a string refers to an MS-DOS drive. * environ.cc (winenv): Ditto. * spawn.cc (find_exec): Ditto. * path.cc (get_raw_device_number): Ditto. (mount_info::conv_to_posix_path): Ditto. (chdir): Ditto. (cygwin_posix_path_list_p): Ditto. (cygwin_split_path): Ditto. (path_conv::check): Move tmp_buf to beginning of function since it can be used earlier in the loop. Use tmp_buf rather than 'root' to hold root information. (mount_info::conv_to_win32_path): Add trailing slash to end of mount path when it translates to a drive. Add defensive code to avoid writing beyond the end of 'dst'.
* * path.cc (mount_info::conv_to_posix_path): Avoid putting a trailing slash on aChristopher Faylor2000-05-231-6/+9
| | | | | | | | | | | | | directory name when the ms-dos path spec is a root directory of a device. * registry.cc (reg_key::build_reg): Set 'key_is_invalid' flag rather than using an INVALID_HANDLE_KEY. (reg_key::get_int): Test for key validity before performing registry operations. (reg_key::set_int): Ditto. (reg_key::get_string): Ditto. (reg_key::set_string): Ditto. (reg_key::kill): Ditto. (reg_key::~reg_key): Ditto.
* * path.cc (mount_info::cygdrive_posix_path): Don't add trailing slash ifChristopher Faylor2000-05-171-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | referring to something like c:\. * dcrt0.cc (dll_crt0_1): Move uinfo initialization prior to sig_send initialization to give signal thread a chance to finish. * debug.cc (WFSO): Move to sigproc.cc (WFMO): Ditto. * exceptions.cc (interruptible): Allocate slightly more space for directory just for paranoia's sake. (call_handler): Eliminate nonmain argument. Determine if main thread has set a frame pointer and use it if so. (sig_handle): Eliminate nonmain argument. * net.cc: Record frame information in appropriate routines throughout. * select.cc (select): Ditto. * sigproc.cc: Use sigthread structure to record mainthread id throughout. (sig_send): Record frame information for signal handler. (wait_sig): Reflect argument change in sig_handle. (WFSO): Move here and record frame information for signal handler. (WFMO): Ditto. * sigproc.h: Implement new "sigthread" class. Implement "sigframe" class for manipulating signal frame info. * thread.cc (__pthread_kill): Use standard _kill() function rather than calling sig_send directly. * winsup.h: Eliminate ebp element from signal_dispatch class.
* * path.cc (symlink::info): Treat non readable filesCorinna Vinschen2000-05-081-1/+1
| | | | as normal non symlink files.
* * configure.in: Use -gstabs+ as compile debug option. This seems to promoteChristopher Faylor2000-05-041-6/+0
| | | | | | | | | | | better handling of symbols. * configure: Regenerate. * delqueue.cc (delqueue_list::process_queue): Allow ERROR_ACCESS_DENIED to indicate that a file is being shared under Windows 95. * syscalls.cc (_unlink): Use full path name. Take special action for Windows 95. Assume that an ERROR_ACCESS_DENIED indicates a sharing violation unless it's on a remote drive. Punt if there is an ERROR_ACCESS_DENIED on a remote drive.
* * Makefile.in: Add dependencies for fhandler_random.oCorinna Vinschen2000-05-031-1/+10
| | | | | | | | | | | | | | * fhandler.h: Add device type FH_RANDOM. Add class fhandler_dev_random. * fhandler_random.cc: New file. Implementation of fhandler_dev_random. * hinfo.cc (build_fhandler): Add case for FH_RANDOM. * path.cc: Add device names for random devices to windows_device_names. (get_device_number): Add if branch for random devices. (win32_device_name): Add device name generation for random devices. winsup.h: Include <wincrypt.h>.
* * path.cc (mount_info::conv_to_win32_path): Previous patchDJ Delorie2000-05-021-1/+1
| | | | failed to set flags on a win32 path.
* * path.cc (normalize_win32_path): Don't add a trailing slash when one alreadyChristopher Faylor2000-04-271-48/+26
| | | | | | exists. (mount_info::conv_to_win32_path): Use existing code for dealing with relative path names when input is already a win32 path.
* * exceptions.cc (interruptible): Allocate slightly more space for directoryChristopher Faylor2000-04-261-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | name check. Windows 95 seems to null-terminate the directory otherwise. (interrupt_on_return): Issue a fatal error if we can't find the caller's stack. * spawn.cc (find_exec): Accept a path_conv argument rather than a buffer so that the caller can find things out about a translated path. (perhaps_suffix): Ditto. (spawn_guts): Allocate path_conv stuff here so that we can find out stuff about the translated path (this is work in progress). * environ.cc (environ_init): Accept an as-yet unused argument indicating whether we were invoked from a cygwin parent or not. (winenv): Ditto. (posify): Accept an argument indicating whether the path has already been translated. * dlfcn.cc (check_access): Provide a path_conv buffer to find_exec. * exec.cc (sexecvpe): Ditto. * path.cc (path_conv::check): Rename from path_conv::path_conv. (mount_item::getmntent): Recognize "Cygwin executable" bit. (symlink_info::check): Remove debugging statements. * path.h (class path_conv): Add iscygexec method. Rewrite constructor to call "check" method to allow multiple operations on a path_conv variable. * pinfo.cc (pinfo_init): Pass argument to environ_init. * shared.h: Bump PROC_MAGIC. * winsup.h: Reflect above changes to function arguments. * include/sys/mount.h: Add MOUNT_CYGWIN_EXEC type.
* * fhandler.cc (fhandler_disk_file::open): Check for allow_ntsecCorinna Vinschen2000-04-251-11/+0
| | | | | | | | | | | | | 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.
* Fix handling of /.filenameChristopher Faylor2000-04-211-1/+5
|
* * path.cc (normalize_posix_path): Previous two patches were still incorrect soChristopher Faylor2000-04-211-57/+49
| | | | | | rewrite this function to deal with trailing dots. (mount_info::conv_to_win32_path): Just check for '/' where appropriate. Eliminate nofinalslash call since it is handled in normalize_posix_path now.
* * path.cc (normalize_posix_path): Previous change failed to take rootChristopher Faylor2000-04-201-1/+1
| | | | access into account.
* * fhandler.h (fhandler_base::hclose): New virtual method.Christopher Faylor2000-04-201-1/+3
| | | | | | | (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.
* * dcrt0.cc (insert_file): Avoid freeing previously allocated argument list.Christopher Faylor2000-04-131-59/+67
| | | | | | | | | | * path.cc (symlink_info::check): Rename from symlink_check_one. Use new symlink_info struct for communication. (path_conv::path_conv): Use symlink_info structure for communication with symlink_info::check. Fix typo which resulted in symbolic links always being resolved. (readlink): Use stat_suffixes array when resolving a link. * syscalls.cc (stat_suffixes): Make global.
* * path.cc (conv_to_win32_path): Detect a win32 pathCorinna Vinschen2000-04-131-4/+24
| | | | if path contains backslashes.
* Fix typo.Christopher Faylor2000-04-131-4/+3
|
* * path.cc (path_conv::path_conv): Ensure that suffix is correctly copied toChristopher Faylor2000-04-121-18/+18
| | | | path when we've found a symlink but aren't following symlinks.
* * newlib/libc/include/sys/unistd.h: Add prototypes forCorinna Vinschen2000-04-021-1/+4
| | | | | | | | | | | | | | fchmod, fchown, lchown. * winsup/cygwin/syscalls.cc (chown_worker): Use previous uid/gid if new uid/gid is -1. New static function with chown functionality. (chown): Call chown_worker with SYMLINK_FOLLOW. (fchown): New function. Call chown_worker with SYMLINK_FOLLOW. (lchown): New function. Call chown_worker with SYMLINK_IGNORE. * cygwin.din: Add symbols for fchown, lchown. * path.cc (symlink): Call `set_file_attribute()' and `SetFileAttributeA()' instead of `chmod()' to set uid/gid correct.
* * Makefile.in: Use default rules when compiling cygrun.o.Christopher Faylor2000-03-281-9/+11
| | | | | | | | * dcrt0.cc (host_dependent_constants::init): Limit non-NT platforms to 32K chunks when copying regions during a fork. * path.cc (symlink_check_one): Add temporary debugging output. Simplify PATH_EXEC test. * syscalls.cc (stat_suffixes): Null terminate this list.
* * path.cc (symlink_check_one): Recognize symlink settings from the mount table.Christopher Faylor2000-03-261-1/+1
| | | | | | | * path.h: Make PATH_SYMLINK an alias for MOUNT_SYMLINK. * syscalls.cc (stat_worker): Use extension search mechanism in path_conv to look for .exe rather than trying to special case it here. * mount.h: Make MOUNT_SYMLINK a real option.
* * security.cc (set_process_privileges): Removed `static'.Corinna Vinschen2000-03-161-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* Respond to a multitude of g++ warnings.Christopher Faylor2000-02-211-1/+1
|
* import winsup-2000-02-17 snapshotChristopher Faylor2000-02-171-0/+2836