mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
d0d86ab588
NtQueryInformationToken is by far the only system call in NT where ReturnLength simply cannot be optional. On Windows this parameter is always probed and an argument to NULL directly leads to an access violation exception. This is due to the fact of how tokens work, as its information contents (token user, owner, primary group, et al) are dynamic and can vary throughout over time in memory. What happens on current ReactOS master however is that ReturnLength is only probed if the parameter is not NULL. On a NULL case scenario the probing checks succeed and NtQueryInformationToken fails later. For this, just get rid of CompleteProbing parameter and opt in for a bit mask flag based approach, with ICIF_FORCE_RETURN_LENGTH_PROBE being set on DefaultQueryInfoBufferCheck which NtQueryInformationToken calls it to do sanity checks. In addition to that... - Document the ICIF probe helpers - Annotate the ICIF prope helpers with SAL - With the riddance of CompleteProbing and adoption of flags based approach, add ICIF_PROBE_READ_WRITE and ICIF_PROBE_READ flags alongside with ICIF_FORCE_RETURN_LENGTH_PROBE |
||
---|---|---|
.. | ||
adapter.c | ||
arcname.c | ||
bootlog.c | ||
controller.c | ||
device.c | ||
deviface.c | ||
driver.c | ||
error.c | ||
file.c | ||
iocomp.c | ||
ioevent.c | ||
iofunc.c | ||
iomdl.c | ||
iomgr.c | ||
iorsrce.c | ||
iotimer.c | ||
iowork.c | ||
irp.c | ||
irq.c | ||
ramdisk.c | ||
rawfs.c | ||
remlock.c | ||
symlink.c | ||
util.c | ||
volume.c |