From ae5adeaf2b5f5d6bfb182417eff14dc1354d1fe3 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 10 Feb 2009 06:31:50 -0500 Subject: [PATCH] core: allow uid 0 to activate user connections Previously, uid 0 was not permitted to activate user connections, but in some cases this is desired. --- src/nm-manager.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/nm-manager.c b/src/nm-manager.c index 1b40834432..ca77337b7f 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -2029,6 +2029,14 @@ is_user_request_authorized (NMManager *manager, goto out; } + /* Let root activate anything. + * FIXME: use a PolicyKit permission instead + */ + if (0 == sender_uid) { + success = TRUE; + goto out; + } + service_name = dbus_g_proxy_get_bus_name (priv->user_proxy); if (!service_name) { g_set_error (error, NM_MANAGER_ERROR,