|
|
aa8926 |
From d8d0c8c40049cfd824b2b90d0cd47914052b9811 Mon Sep 17 00:00:00 2001
|
|
|
aa8926 |
From: Ondrej Holy <oholy@redhat.com>
|
|
|
aa8926 |
Date: Wed, 2 Jan 2019 17:13:27 +0100
|
|
|
aa8926 |
Subject: [PATCH] admin: Prevent access if any authentication agent isn't
|
|
|
aa8926 |
available
|
|
|
aa8926 |
|
|
|
aa8926 |
The backend currently allows to access and modify files without prompting
|
|
|
aa8926 |
for password if any polkit authentication agent isn't available. This seems
|
|
|
aa8926 |
isn't usually problem, because polkit agents are integral parts of
|
|
|
aa8926 |
graphical environments / linux distributions. The agents can't be simply
|
|
|
aa8926 |
disabled without root permissions and are automatically respawned. However,
|
|
|
aa8926 |
this might be a problem in some non-standard cases.
|
|
|
aa8926 |
|
|
|
aa8926 |
This affects only users which belong to wheel group (i.e. those who are
|
|
|
aa8926 |
already allowed to use sudo). It doesn't allow privilege escalation for
|
|
|
aa8926 |
users, who don't belong to that group.
|
|
|
aa8926 |
|
|
|
aa8926 |
Let's return permission denied error also when the subject can't be
|
|
|
aa8926 |
authorized by any polkit agent to prevent this behavior.
|
|
|
aa8926 |
|
|
|
aa8926 |
Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/355
|
|
|
aa8926 |
---
|
|
|
aa8926 |
daemon/gvfsbackendadmin.c | 3 +--
|
|
|
aa8926 |
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
aa8926 |
|
|
|
aa8926 |
diff --git a/daemon/gvfsbackendadmin.c b/daemon/gvfsbackendadmin.c
|
|
|
aa8926 |
index ec0f2392..0f849008 100644
|
|
|
aa8926 |
--- a/daemon/gvfsbackendadmin.c
|
|
|
aa8926 |
+++ b/daemon/gvfsbackendadmin.c
|
|
|
aa8926 |
@@ -130,8 +130,7 @@ check_permission (GVfsBackendAdmin *self,
|
|
|
aa8926 |
return FALSE;
|
|
|
aa8926 |
}
|
|
|
aa8926 |
|
|
|
aa8926 |
- is_authorized = polkit_authorization_result_get_is_authorized (result) ||
|
|
|
aa8926 |
- polkit_authorization_result_get_is_challenge (result);
|
|
|
aa8926 |
+ is_authorized = polkit_authorization_result_get_is_authorized (result);
|
|
|
aa8926 |
|
|
|
aa8926 |
g_object_unref (result);
|
|
|
aa8926 |
|
|
|
aa8926 |
--
|
|
|
aa8926 |
2.20.1
|
|
|
aa8926 |
|