aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2019-02-25 21:06:15 +0100
committerCorinna Vinschen <corinna@vinschen.de>2019-02-25 21:06:15 +0100
commit3b3ba558e90e7ce07eb0b9a5939453d4b90bd5e5 (patch)
tree7d1b2e6dd940dfa3e80c8f2b64f5146b4d009d31
parent98afd02be3a507ed09d77eb0cf9569480740edd8 (diff)
downloadnewlib-3b3ba558e90e7ce07eb0b9a5939453d4b90bd5e5.zip
newlib-3b3ba558e90e7ce07eb0b9a5939453d4b90bd5e5.tar.gz
newlib-3b3ba558e90e7ce07eb0b9a5939453d4b90bd5e5.tar.bz2
Cygwin: use NULL security descriptor in InitializeObjectAttributes
Using sec_none{_nih} is just a roundabout way to specify a NULL SD. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/forkable.cc6
-rw-r--r--winsup/cygwin/mmap.cc3
-rw-r--r--winsup/cygwin/posix_timer.cc3
3 files changed, 4 insertions, 8 deletions
diff --git a/winsup/cygwin/forkable.cc b/winsup/cygwin/forkable.cc
index 1067eac..d1b0f57 100644
--- a/winsup/cygwin/forkable.cc
+++ b/winsup/cygwin/forkable.cc
@@ -58,8 +58,7 @@ mkdirs (PWCHAR ntdirname, int lastsepcount)
UNICODE_STRING dn;
RtlInitUnicodeString (&dn, ntdirname);
OBJECT_ATTRIBUTES oa;
- InitializeObjectAttributes (&oa, &dn, 0, NULL,
- sec_none_nih.lpSecurityDescriptor);
+ InitializeObjectAttributes (&oa, &dn, 0, NULL, NULL);
HANDLE dh = NULL;
NTSTATUS status;
IO_STATUS_BLOCK iosb;
@@ -765,8 +764,7 @@ dll_list::create_forkables ()
RtlInitUnicodeString (&fn, ntname);
OBJECT_ATTRIBUTES oa;
- InitializeObjectAttributes (&oa, &fn, 0, NULL,
- sec_none_nih.lpSecurityDescriptor);
+ InitializeObjectAttributes (&oa, &fn, 0, NULL, NULL);
HANDLE hlocal = NULL;
NTSTATUS status;
IO_STATUS_BLOCK iosb;
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index f48790a..1d81d53 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -145,8 +145,7 @@ CreateMapping (HANDLE fhdl, size_t len, off_t off, DWORD openflags,
ULONG attributes = attached (prot) ? SEC_RESERVE : SEC_COMMIT;
OBJECT_ATTRIBUTES oa;
- InitializeObjectAttributes (&oa, NULL, OBJ_INHERIT, NULL,
- sec_none.lpSecurityDescriptor);
+ InitializeObjectAttributes (&oa, NULL, OBJ_INHERIT, NULL, NULL);
if (fhdl == INVALID_HANDLE_VALUE)
{
diff --git a/winsup/cygwin/posix_timer.cc b/winsup/cygwin/posix_timer.cc
index 0332cab..d9d4a9a 100644
--- a/winsup/cygwin/posix_timer.cc
+++ b/winsup/cygwin/posix_timer.cc
@@ -306,8 +306,7 @@ timer_tracker::settime (int flags, const itimerspec *new_value,
{
OBJECT_ATTRIBUTES attr;
- InitializeObjectAttributes (&attr, NULL, 0, NULL,
- sec_none_nih.lpSecurityDescriptor);
+ InitializeObjectAttributes (&attr, NULL, 0, NULL, NULL);
status = NtCreateEvent (&cancel_evt, EVENT_ALL_ACCESS, &attr,
NotificationEvent, FALSE);
if (!NT_SUCCESS (status))