Here for the pkexec/sudo case done using systemd-run - the script is similar to sudo and doesn't need to be setuid:
https://gist.github.com/pothos/73dd4f7694acc3b6bbed614438f6e...
https://gist.github.com/pothos/73dd4f7694acc3b6bbed614438f6e...
No comments yet.