diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-08-19 13:46:31 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-08-19 13:46:31 +0400 |
commit | ec8a7e416f570407fe5360959272418a2b4c79f8 (patch) | |
tree | 85b1b67db3da90ab72479e98e8dceb06ab96cc35 /winsup/cygwin | |
parent | 46c6def37f8e2c1747e6715f6c811a62820bdc33 (diff) |
* fhandler_disk_file.cc (fhandler_disk_file::mkdir): Drop fattr variable
and use FILE_ATTRIBUTE_DIRECTORY directly in call to NtCreateFile.
* posix_ipc.cc (ipc_mutex_init): Fix format string when creating IPC
object name.
(ipc_cond_init): Ditto.
* security.cc (alloc_sd): Add parentheses to fix setting initial
owner_allow value.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 10 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/posix_ipc.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/security.cc | 4 |
4 files changed, 16 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ae21fe5d6..42e57fb92 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,13 @@ +2008-08-19 Corinna Vinschen <corinna@vinschen.de> + + * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Drop fattr variable + and use FILE_ATTRIBUTE_DIRECTORY directly in call to NtCreateFile. + * posix_ipc.cc (ipc_mutex_init): Fix format string when creating IPC + object name. + (ipc_cond_init): Ditto. + * security.cc (alloc_sd): Add parentheses to fix setting initial + owner_allow value. + 2008-08-18 Christopher Faylor <me+cygwin@cgf.cx> * fhandler.cc (fhandler_base::wait_overlapped): Don't treat diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 5ec3e34f1..cbfa36a48 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1386,7 +1386,6 @@ fhandler_disk_file::mkdir (mode_t mode) HANDLE dir; OBJECT_ATTRIBUTES attr; IO_STATUS_BLOCK io; - ULONG fattr = FILE_ATTRIBUTE_DIRECTORY; PFILE_FULL_EA_INFORMATION p = NULL; ULONG plen = 0; @@ -1410,7 +1409,8 @@ fhandler_disk_file::mkdir (mode_t mode) } status = NtCreateFile (&dir, FILE_LIST_DIRECTORY | SYNCHRONIZE, pc.get_object_attr (attr, sa), &io, NULL, - fattr, FILE_SHARE_VALID_FLAGS, FILE_CREATE, + FILE_ATTRIBUTE_DIRECTORY, FILE_SHARE_VALID_FLAGS, + FILE_CREATE, FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT | FILE_OPEN_FOR_BACKUP_INTENT, p, plen); diff --git a/winsup/cygwin/posix_ipc.cc b/winsup/cygwin/posix_ipc.cc index 102691ecb..53b887493 100644 --- a/winsup/cygwin/posix_ipc.cc +++ b/winsup/cygwin/posix_ipc.cc @@ -90,7 +90,7 @@ ipc_mutex_init (HANDLE *pmtx, const char *name) char buf[MAX_PATH]; SECURITY_ATTRIBUTES sa = sec_none; - __small_sprintf (buf, "mqueue/mtx_%W", name); + __small_sprintf (buf, "mqueue/mtx_%s", name); sa.lpSecurityDescriptor = everyone_sd (CYG_MUTANT_ACCESS); *pmtx = CreateMutex (&sa, FALSE, buf); if (!*pmtx) @@ -135,7 +135,7 @@ ipc_cond_init (HANDLE *pevt, const char *name) char buf[MAX_PATH]; SECURITY_ATTRIBUTES sa = sec_none; - __small_sprintf (buf, "mqueue/evt_%W", name); + __small_sprintf (buf, "mqueue/evt_%s", name); sa.lpSecurityDescriptor = everyone_sd (CYG_EVENT_ACCESS); *pevt = CreateEvent (&sa, TRUE, FALSE, buf); if (!*pevt) diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index 5d9846abc..58c740e21 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -466,8 +466,8 @@ alloc_sd (path_conv &pc, __uid32_t uid, __gid32_t gid, int attribute, Don't set FILE_READ/WRITE_ATTRIBUTES unconditionally on Samba, otherwise it enforces read permissions. Same for other's below. */ DWORD owner_allow = STANDARD_RIGHTS_ALL - | pc.fs_is_samba () - ? 0 : (FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES); + | (pc.fs_is_samba () + ? 0 : (FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES)); if (attribute & S_IRUSR) owner_allow |= FILE_GENERIC_READ; if (attribute & S_IWUSR) |