Skip to content
Commit 8e9439ef authored by Ondrej Holy's avatar Ondrej Holy
Browse files

admin: Require mounting for each client explicitly

The admin backend is pretty special, because it can't use GMountOperation
for authorization and polkit prompt is shown for each client. This leads
to unwanted behavior because the admin prompt might be shown unexpectedly
(e.g. when obtaining info for recently used files).

Let's require mounting explicitly for each client. So each client gets
G_IO_ERROR_NOT_MOUNTED if it hasn't called g_file_mountable_mount before.
It works nicely for most of the apps which I tested (e.g. with Nautilus,
GEdit, Totem, Evince, GIMP, LibreOffice). However, this requires changes
for some applications, which expects that the file is already mounted
(e.g. EOG).

Unfortunatelly, it breaks utils like "gio list" because it fails with
"The specified location is not mounted" error and "gio mount admin:///"
doesn't help, because it has different PID.

This isn't ideal, but it is better than the unexpected password prompts...

https://bugzilla.gnome.org/show_bug.cgi?id=771285
parent 46956d5d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment