mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
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>
This commit is contained in:
parent
98afd02be3
commit
3b3ba558e9
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user