| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
selecting the sections manually.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
| |
if the map is still referenced to emulate Linux and BSD behaviour.
|
|
|
|
| |
as well as connected shm_attached_list entry.
|
|
|
|
|
| |
(cygwin_getaddrinfo): Simplify formatting.
(cygwin_getnameinfo): Ditto.
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
| |
write bits for directories with R/O attribute.
(fhandler_base::fhaccess): Don't shortcircuit R/O attribute with W_OK
scenarios for directories.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
to allow multibyte chars.
|
|
|
|
| |
FILE_OPEN_REPARSE_POINT flag. Fix typo in comment.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
Shrink buf to 4 bytes. Use buf only for border cases.
(dirname): Ditto.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
in w32api / MSDN.
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Accommodate
change to struct _FILE_COMPRESSION_INFORMATION.
|
| |
|
| |
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
| |
too.
|
|
|
|
| |
Add comment.
|
|
|
|
|
| |
2007-08-24: Call has_acls to avoid permission problems getting
a handle to a file on a remote share. Add comment.
|
|
|
|
| |
definition on _COMPILING_NEWLIB.
|
| |
|
|
|
|
|
|
| |
that has the __SSTR flag set.
(_ftrylockfile): Likewise.
(_funlockfile): Likewise.
|
| |
|
|
|
|
|
|
| |
* path.cc (get_nt_native_path): Reset upath.Length to 0 on each
invocation.
(symlink_info::check): Use NT native functions.
|
| |
|
|
|
|
|
| |
for executable file magic using a thread safe method and re-enable this
code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
| |
the NT status consistently. Use UNICODE path information if available.
|
|
|
|
| |
* path.h (path_conv::get_wide_win32_path_len): Define.
|
|
|
|
| |
* winsup.h (rootdir): Drop declaration.
|
|
|
|
|
|
| |
calling fs_info::update.
* path.h (fs_info::clear): Simplify.
(fs_info::fs_info): Add constructor.
|
| |
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
| |
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_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.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
(RtlReleasePebLock): Declare.
* path.cc (cwdstuff::set): Change PEB only while it's locked.
|
|
|
|
|
| |
* fhandler_disk_file.cc (readdir_get_ino): Ditto in call to
hash_path_name.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
| |
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.
|