summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2019-01-02 17:13:27 +0100
committerOndrej Holy <oholy@redhat.com>2019-01-14 14:28:16 +0100
commite4eec2bc863e85e2b6b47e4d1c3bdd90ab36dc93 (patch)
treea1b174ea63e51516171c392a446255921088fbf5
parentf19d9e89bbb80c55bf7a6dee6643ec2728f51121 (diff)
downloadgvfs-e4eec2bc863e85e2b6b47e4d1c3bdd90ab36dc93.tar.gz
admin: Prevent access if any authentication agent isn't available
The backend currently allows to access and modify files without prompting for password if any polkit authentication agent isn't available. This seems isn't usually problem, because polkit agents are integral parts of graphical environments / linux distributions. The agents can't be simply disabled without root permissions and are automatically respawned. However, this might be a problem in some non-standard cases. This affects only users which belong to wheel group (i.e. those who are already allowed to use sudo). It doesn't allow privilege escalation for users, who don't belong to that group. Let's return permission denied error also when the subject can't be authorized by any polkit agent to prevent this behavior. Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/355
-rw-r--r--daemon/gvfsbackendadmin.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/daemon/gvfsbackendadmin.c b/daemon/gvfsbackendadmin.c
index ec0f2392..0f849008 100644
--- a/daemon/gvfsbackendadmin.c
+++ b/daemon/gvfsbackendadmin.c
@@ -130,8 +130,7 @@ check_permission (GVfsBackendAdmin *self,
return FALSE;
}
- is_authorized = polkit_authorization_result_get_is_authorized (result) ||
- polkit_authorization_result_get_is_challenge (result);
+ is_authorized = polkit_authorization_result_get_is_authorized (result);
g_object_unref (result);