I am new to Rust and I am planning to write a system service that runs with local system security context. But I want that service to launch an application with user's security context. In a nutshell, this service will be running in LocalSystem account and I am willing to launch the application as currently interactively logged on user.
In C++ we have these apis WTSQueryUserToken (to get the user token) and CreateProcessAsUser (to launch process as currently logged in user). I wanted to understand how complicated it is to implement that in Rust. How to use these apis in Rust ? I have checked crates.io but couldn't find any similar api.
Any sample service or leads will be of great help.