summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
* * cygheap.cc (_crealloc): Avoid memcpy when _cmalloc returns NULL.Christopher Faylor2007-11-232-2/+9
|
* revert premature checkinChristopher Faylor2007-11-081-49/+4
|
* revert premature checkinChristopher Faylor2007-11-084-67/+21
|
* * dllfixdbg: Eliminate extra objcopy step.Christopher Faylor2007-11-088-30/+121
|
* * dllfixdbg: Pass --only-keep-debug to objcopy, instead ofCorinna Vinschen2007-11-082-5/+8
| | | | selecting the sections manually.
* * thread.cc (pthread_key_create): Drop check for incoming valid object.Corinna Vinschen2007-11-062-5/+4
|
* * shm.cc: Include sync.hCorinna Vinschen2007-11-062-21/+68
| | | | | | | | | | | | | | | | (struct shm_shmid_list): Add ref_count member. (struct shm_attached_list): Remove hdl and size members. Add a parent member pointing to referenced shm_shmid_list entry. (shm_guard): New muto. (SLIST_LOCK): Define. (SLIST_UNLOCK): Define. (fixup_shms_after_fork): Use hdl and size members of parent shm_shmid_list entry. (shmat): Access sequential bookkeeping lists in a thread safe way. Accommodate change in list element layout. Align comments. (shmctl): Ditto. (shmdt): Ditto. (shmget): Ditto.
* * shm.cc (shmctl): On IPC_RMID don't unmap views and don't close handleCorinna Vinschen2007-11-052-10/+13
| | | | if the map is still referenced to emulate Linux and BSD behaviour.
* * shm.cc (shmctl): On IPC_RMID also unmap all views on shared memCorinna Vinschen2007-11-052-0/+18
| | | | as well as connected shm_attached_list entry.
* * net.cc (load_ipv6_funcs): Use MAX_PATH instead of CYG_MAX_PATH.Corinna Vinschen2007-10-312-86/+90
| | | | | (cygwin_getaddrinfo): Simplify formatting. (cygwin_getnameinfo): Ditto.
* * external.cc (get_cygdrive_info): Make inline.Corinna Vinschen2007-10-313-13/+12
| | | | | | | (get_cygdrive_prefixes): Remove. (cygwin_internal): Call get_cygdrive_info with NULL flag parameters instead of get_cygdrive_prefixes. * path.cc (mount_info::get_cygdrive_info): Allow NULL flag parameters.
* * fhandler_disk_file.cc (fhandler_base::fstat_helper): Don't removeCorinna Vinschen2007-10-303-3/+11
| | | | | | write bits for directories with R/O attribute. (fhandler_base::fhaccess): Don't shortcircuit R/O attribute with W_OK scenarios for directories.
* * cygheap.h (struct cwdstuff): Drop hash member. Drop get_hash,Corinna Vinschen2007-10-236-186/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | get_initial, and fixup_after_exec declarations. Convert win32 to UNICODE_STRING. (cwdstuff::get_drive): Convert win32 path in current codepage. (cwdstuff::set): Take native NT path. * ntdll.h (struct _TEB): Typedef. * path.cc (mount_info::conv_to_posix_path): Add variant taking wide char DOS paths. (symlink_info::posixify): Simplify concatenating cwd and relative path. (hash_path_name): Drop special relative path handling. (chdir): Drop special "drive only" handling. Call cwdstuff::set with native path. (cwdstuff::get_hash): Remove. (windows_system_directory): Remove. (_upp): Remove. (get_user_proc_parms): Make inline. Get PEB pointer by calling NtCurrentTeb. (cwdstuff::init): Simplify. (cwdstuff::set): Rework to handle incoming native NT path. Workaround a Vista problem with CWD handle in the user process parameter block. (cwdstuff::get): Simplify locking. Accommodate type change of win32. * shared_info.h (mount_info): Add declaration for new conv_to_posix_path method. * strfuncs.cc (sys_wcstombs): Return correct length of created multi-byte string.
* * fhandler_disk_file.cc (__DIR_mounts::eval_ino): Make fname big enoughCorinna Vinschen2007-10-192-2/+7
| | | | to allow multibyte chars.
* * fhandler.cc (fhandler_base::open): Open native symlinks withCorinna Vinschen2007-10-182-30/+43
| | | | FILE_OPEN_REPARSE_POINT flag. Fix typo in comment.
* * include/sys/param.h (MAXPATHLEN): Define as PATH_MAX.Corinna Vinschen2007-10-182-4/+7
|
* * fhandler.cc (is_at_eof): Rewrite using NT functions.Corinna Vinschen2007-10-154-74/+108
| | | | | | | | | | | | | | (off_current): New static variable. (off_append): Ditto. (fhandler_base::raw_write): Use NtWriteFile. Accommodate O_APPEND here. (fhandler_base::write): Drop O_APPEND hack. Use NT functions. (fhandler_base::lseek): Rewrite using NT functions. * fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Add space in debug output. (fhandler_disk_file::ftruncate): Ditto. * ntdll.h (STATUS_DISK_FULL): Define. (FILE_USE_FILE_POINTER_POSITION): Define. (FILE_WRITE_TO_END_OF_FILE): Define.
* * ntdll.h (STATUS_END_OF_FILE): Define.Corinna Vinschen2007-10-133-18/+41
| | | | | | | * path.cc (symlink_info::check_shortcut): Use NT function to get file size. Reintroduce checking file size before reading it. Eliminiate close_it label. (symlink_info::check_sysfile): Check for EOF condition.
* * path.cc (basename): Return pointer into the path argument itself.Corinna Vinschen2007-10-112-15/+27
| | | | | Shrink buf to 4 bytes. Use buf only for border cases. (dirname): Ditto.
* * path.cc (struct symlink_info): Change size of contents member toCorinna Vinschen2007-10-103-230/+301
| | | | | | | | | | | | | | | | | | | | | | be able to keep SYMLINK_MAX sized strings. (symlink_worker): Rework for long path names. When writing windows shortcuts, store pathname additionally "hidden" after the actual shortcut data to workaround size limitations of the description field. (symlink_info::check_shortcut): Drop file name parameter. Drop max file size check. Use NT functions. Use appended full path if available, description otherwise. Check symlink string length for not exceeding SYMLINK_MAX. Don't close file here. (symlink_info::check_sysfile): Drop file name parameter. Use NT functions. Check symlink string length for not exceeding SYMLINK_MAX. Don't close file here. (symlink_info::check_reparse_point): Drop file name parameter. Drop useless length checks. Allow SYMLINK_MAX length symlink strings. Don't close file here. (symlink_info::posixify): Allow SYMLINK_MAX length symlink strings. (symlink_info::check): Turn around checking for symlink file attributes. Use NT functions. Close symlink file here. * include/limits.h (PATH_MAX): Define as 32760. Change comment. (SYMLINK_MAX): Define as PATH_MAX - 1.
* * fhandler_socket.cc (fhandler_socket::bind): Open file for deletion,Corinna Vinschen2007-10-102-17/+31
| | | | | | too. Don't write to file and especially don't close handle if file couldn't be created. Set delete disposition if writing failed, instead of calling unlink_nt.
* * ntdll.h (struct _FILE_COMPRESSION_INFORMATION): Align with definitionCorinna Vinschen2007-09-273-4/+13
| | | | | | in w32api / MSDN. * fhandler_disk_file.cc (fhandler_base::fstat_helper): Accommodate change to struct _FILE_COMPRESSION_INFORMATION.
* * termios.cc (setspeed): Support new baud rates introduced 2007-02-05.Corinna Vinschen2007-09-262-0/+14
|
* * ntdll.h (STATUS_OBJECT_NAME_INVALID): Define.Corinna Vinschen2007-09-202-0/+5
|
* * mmap.cc (fh_disk_file): Delete as global static variable and...Corinna Vinschen2007-09-182-9/+18
| | | | | | | (mmap64): ...define as local pointer to make mmap thread-safe. Accommodate throughout. Only initialize fh_disk_file after file could be opened with GENERIC_EXECUTE access. Call fstat_by_handle instead of fstat to avoid overhead.
* * security.cc (set_file_sd): Open file with FILE_OPEN_FOR_BACKUP_INTENTCorinna Vinschen2007-09-182-1/+7
| | | | too.
* * path.cc (symlink_info::check): Check for STATUS_OBJECT_NAME_INVALID.Corinna Vinschen2007-09-182-2/+17
| | | | Add comment.
* * fhandler.cc (fhandler_base::open): Partly revert change fromCorinna Vinschen2007-09-172-1/+17
| | | | | 2007-08-24: Call has_acls to avoid permission problems getting a handle to a file on a remote share. Add comment.
* * include/cygwin/config.h: Conditionalize inline __getreent()Brian Dessent2007-09-082-0/+7
| | | | definition on _COMPILING_NEWLIB.
* * include/cygwin/config.h (__getreent): Define inline version.Brian Dessent2007-09-072-0/+25
|
* * include/sys/stdio.h (_flockfile): Don't try to lock a FILEBrian Dessent2007-09-062-3/+16
| | | | | | that has the __SSTR flag set. (_ftrylockfile): Likewise. (_funlockfile): Likewise.
* * syscalls.cc (open): Don't follow symlinks if O_EXCL is given.Corinna Vinschen2007-08-242-2/+7
|
* * ntdll.h (STATUS_NO_SUCH_FILE): Define.Corinna Vinschen2007-08-233-31/+84
| | | | | | * path.cc (get_nt_native_path): Reset upath.Length to 0 on each invocation. (symlink_info::check): Use NT native functions.
* * uinfo.cc (pwdgrp::load): Use NT native functions.Corinna Vinschen2007-08-212-36/+57
|
* * fhandler_disk_file.cc (fhandler_base::fstat_helper): Rewrite checkingCorinna Vinschen2007-08-212-23/+23
| | | | | for executable file magic using a thread safe method and re-enable this code.
* * syscalls.cc (unlink_nt): Drop one local FILE_BASIC_INFORMATION struct.Corinna Vinschen2007-08-212-1/+4
|
* * ntdll.h (NtNotifyChangeDirectoryFile): Declare.Corinna Vinschen2007-08-215-29/+91
| | | | | | | | | | | | | | (NtQueryAttributesFile): Move to maintain alphabetical order of declarations. Add comment to note that timestamp information returned by NtQueryAttributesFile is unreliable. * path.h (etc::changed_h): Move here. (etc::fn): Change type to OBJECT_ATTRIBUTES. (etc::last_modified): Change type to LARGE_INTEGER. (etc::init): Take PUNICODE_STRING as second argument. * path.cc: Accomodate above changes. (etc::test_file_change): Use NT native functions. (etc::dir_changed): Ditto. * uinfo.cc (pwdgrp::load): Call etc::init with NT native path.
* * fhandler_disk_file.cc: Change debugging output througout to printCorinna Vinschen2007-08-212-15/+20
| | | | the NT status consistently. Use UNICODE path information if available.
* * hookapi.cc (ld_preload): Call LoadLibraryW.Corinna Vinschen2007-08-203-1/+13
| | | | * path.h (path_conv::get_wide_win32_path_len): Define.
* * fhandler.cc (rootdir): Delete.Corinna Vinschen2007-08-203-90/+5
| | | | * winsup.h (rootdir): Drop declaration.
* * path.cc (fillout_mntent): Append backslash to drive-only paths beforeCorinna Vinschen2007-08-193-14/+14
| | | | | | calling fs_info::update. * path.h (fs_info::clear): Simplify. (fs_info::fs_info): Add constructor.
* * spawn.cc (spawn_guts): Fix typo in comment.Corinna Vinschen2007-08-172-1/+5
|
* * autoload.cc (CloseDesktop): Define.Corinna Vinschen2007-08-173-18/+65
| | | | | | | | | (CreateDesktopA): Define. (SetThreadDesktop): Define. * spawn.cc (spawn_guts): When starting a process under another user account, don't open up permissions on current window station and desktop. Instead, if not in interactive session, create a new per-user window station plus default desktop and use that for the child process.
* * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Handle S_IFSOCKCorinna Vinschen2007-08-163-4/+10
| | | | | | mode bit by setting the SYSTEM attribute. * fhandler_socket.cc (fhandler_socket::fchmod): Add S_IFSOCK mode bit when calling fhandler_disk_file::fchmod. Don't set attributes here.
* * path.h (path_conv::operator char *): Delete.Corinna Vinschen2007-08-169-38/+54
| | | | | | | | | | | | | (path_conv::operator const char *): Delete. * dlfcn.cc: Throughout, replace path_conv::operator char * and path_conv::operator const char * by call to path_conv::get_win32 for easier transition to UNICODE_PATHs. * fhandler_socket.cc: Ditto. * hookapi.cc: Ditto. * path.cc: Ditto. * spawn.cc: Ditto. * syscalls.cc: Ditto. * uinfo.cc: Ditto.
* * dir.cc (readdir_worker): Convert w32name to PUNICODE_STRING.Corinna Vinschen2007-08-165-10/+18
| | | | | | * sec_acl.cc (getacl): Convert debug output to print native NT path. * security.cc (set_file_attribute): Ditto. * syscalls.cc (try_to_bin): Ditto and fix buggy debug statement.
* * ntdll.h (RtlAcquirePebLock): Declare.Corinna Vinschen2007-08-163-5/+12
| | | | | (RtlReleasePebLock): Declare. * path.cc (cwdstuff::set): Change PEB only while it's locked.
* * fhandler.h (fhandler_base::get_namehash): Use NT native path.Corinna Vinschen2007-08-163-2/+8
| | | | | * fhandler_disk_file.cc (readdir_get_ino): Ditto in call to hash_path_name.
* * ntdll.h (RtlCreateUnicodeStringFromAsciiz): Fix declaration.Corinna Vinschen2007-08-164-46/+70
| | | | | | | | | | | | (RtlUpcaseUnicodeChar): Declare. * path.cc (hash_path_name): Split into three functions, taking the path as char *, PWCSTR, or PUNICODE_STRING. Move implementation into PUNICODE_STRING-based function. Drop old drive-relative path consideration. * winsup.h (iswdirsep): Like isdirsep but for WCHARs. (isabspath_u): Like isabspath, for PUNICODE_STRINGs. (iswabspath): Like isabspath, for PWCHARs. (hash_path_name): Add new declarations.
* * path.cc (get_nt_native_path): Allow to convert special paths whichCorinna Vinschen2007-08-153-11/+19
| | | | | | have no native NT path representation for simplified debug output. * syscalls.cc: Convert debug output to print native NT path. (unlink): Drop redundant debug output.