From 3b3ba558e90e7ce07eb0b9a5939453d4b90bd5e5 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 25 Feb 2019 21:06:15 +0100 Subject: 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 --- winsup/cygwin/forkable.cc | 6 ++---- winsup/cygwin/mmap.cc | 3 +-- winsup/cygwin/posix_timer.cc | 3 +-- 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)) -- cgit v1.1