Run gui program as normal user, worker as admin

I have a concept for a design where a gui application is used to do some things that require admin. Instead of running the entire gui app as an admin or root user, the gui program runs as a regular user and runs a secondary program as admin, communicating to the program with stdin (or some other interprocess communication - the data contains things like passwords so I want to avoid hitting the filesystem).
All of it seems doable except the part about running the secondary program as root/admin. I found the runas crate, but it seems to prompt for admin credentials on the command line instead of with the gui (on linux), so that seems not helpful to me.

You might be able do that via polkit. But this is not a Rust-specific problem.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.