EXP [NTOS] Fix flags stuff in ObpCreateUnnamedHandle

This commit is contained in:
Timo Kreuzer 2022-08-31 15:12:24 +02:00
parent d1517f9df3
commit 29b42d0d1f

View file

@ -1395,6 +1395,11 @@ ObpCreateUnnamedHandle(IN PVOID Object,
/* Save the access mask */
NewEntry.GrantedAccess = GrantedAccess;
if (NewEntry.ObAttributes & OBJ_PROTECT_CLOSE)
{
NewEntry.GrantedAccess |= ObpAccessProtectCloseBit;
NewEntry.ObAttributes &= ~OBJ_PROTECT_CLOSE;
}
/*
* Create the actual handle. We'll need to do this *after* calling