]> mj.ucw.cz Git - pciutils.git/commit
windows: Improve win32_change_token()
authorPali Rohár <pali@kernel.org>
Sun, 30 Nov 2025 13:19:52 +0000 (14:19 +0100)
committerMartin Mareš <mj@ucw.cz>
Sun, 28 Dec 2025 20:49:06 +0000 (21:49 +0100)
commita1f6081f3602e06e71af1cf23170cc023d4eb6ab
treefb2905506a2cbc2bda5fbaf2c6facaf7d8b0adfa
parentbec8e35118c02a0b9fbb913bb32c0d75879ed817
windows: Improve win32_change_token()

Function ImpersonateLoggedOnUser() is not available on older Windows
versions.

Instead of ImpersonateLoggedOnUser(), use SetThreadToken() on the
duplicated token of SecurityImpersonation type, same what is
ImpersonateLoggedOnUser() expected to do.
lib/win32-helpers.c