Blame SOURCES/admin-Prevent-access-if-any-authentication-agent-isn.patch

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