impersonate a user from a print filter
Windows API
1
Posts
1
Posters
2
Views
1
Watching
-
I'm working on a filter for an XPSdrv-based printer driver. This filter will output to a file. However, since the filter process/thread runs on the LocalService account, I'm unable to put the file in relevant directories like the user's home directory. LocalService has the SeImpersonatePrivilege privilege, so I can use ImpersonateLoggedOnUser(). But ImpersonateLoggedOnUser() requires a token. The token can be created using LogonUser(),but requires passing the password. So: 1. any way I can get a token from the username only? 2. any other way to solve this problem? thanks!