Comment 4 for bug 1034853

Revision history for this message
Milo Casagrande (milo) wrote :

Using polkit/dbus/udisk is possible, but the program must be run as a privileged user, otherwise the inhibition of automount will not work. The inhibition is at system level, meaning it will be disabled for all the time required (and it can be safely restored at the end).

All l-i-t cli tools require privileges to be run, and (more than once) it is asked to insert the "sudo" password, so it might make sense to ask it at the beginning of the execution and run the entire process as a privileged user.

It might be good to run the program with pkexec, so that policykit will take care of the entire authorization process. To achieve it is necessary to find a way to or elevate the privileges of the running process, or to check and then spawn the process with the correct privileges.

We already have a policykit .policy file in l-i-t tree, it could be extended to include all the l-i-t cli tools, and installed in the system.