Freeze break for USB protection in gnome-session for non-systemd setups

2020-03-05 Thread Tobias Mueller
Hello Release-Team.

I am asking for an exception to have the following patch included in
GNOME 3.36:

https://gitlab.gnome.org/GNOME/gnome-session/-/merge_requests/37

It's purpose is to actually start the USB protection daemon in the non-
systemd case.  The patch is simple in that it adds the component to the
list of things to start up (RequiredComponents).  Not including the
patch makes GNOME behave differently under systemd (or non-systemd,
depending on which side of the fence you are standing).

The maintainers are okay with having it merged and I think the potential
for regression is lower than the effects of the regression that
currently exists. But of course, that's what everybody thinks when they
require an exception ;-)

There are no UI strings involved.

Cheers,
  Tobi

___
release-team@gnome.org
https://mail.gnome.org/mailman/listinfo/release-team
Release-team lurker? Do NOT participate in discussions.


Re: Freeze Break for gnome-control-center to include USB protection

2020-02-13 Thread Tobias Mueller
Hi,

On Wed, 2020-02-12 at 15:57 -0600, Michael Catanzaro wrote:
> Hm, I'm not going to give +1 myself because I just found a typo in
> the 
> new string, and we are very close to string freeze.
Thanks for correcting! :)

I don't know what you're making making out of the fact that you've found
a typo, though. The string has been there since the first version of the
patch from over a year ago. And it has been reviewed as it was twice, at
least. But not from a native speaker.
To me, your sentence sounds a bit like the typo is a result of rushing a
string into the patch. That is not the case.

>  We had six months 
> to land this and it seems pretty late to be adding new UI toggles.
> 
Yeah, I see that argument.
For better or worse: The new switch will only be shown if a recent
enough USBGuard is installed and running. I predict that the combination
is quite niche.

Cheers,
  Tobi

___
release-team@gnome.org
https://mail.gnome.org/mailman/listinfo/release-team
Release-team lurker? Do NOT participate in discussions.


Freeze Break for gnome-control-center to include USB protection

2020-02-12 Thread Tobias Mueller
Hi,

I am asking for a freeze break for having this patch merged:
https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/366

It adds a new switch to the control centre and two (2) new strings to be 
translated.
The patch has already been reviewed and approved, but I guess it was bad timing 
so it didn't make it in before the freeze.
The patch is attached for convenience.

Thanks,
  Tobi
From e1f66ace252ae3f245e628437114891bdbbc3967 Mon Sep 17 00:00:00 2001
From: Ludovico de Nittis 
Date: Wed, 29 Jan 2020 18:09:10 +0100
Subject: [PATCH] lock: Add USB protection entry

In the screen lock tab we add a "Forbid new USB devices" entry with a
switch to enable or disable said protection.

The actual USB protection is handled by gnome-settings-daemon and
USBGuard.

We use the "Available" property of gnome-settings-daemon to check
if we are able to offer the USB protection (i.e. USBGuard is
installed with the minimum required version ecc..).
If the host doesn't met the requirements we hide the USB
protetion row entirely.

Given the fact that the always on protection benefits are very slim we
decided to give just an on/off switch that by default controls the
"with lock screen" protection level.
---
 panels/lock/cc-lock-panel.c  | 110 +++
 panels/lock/cc-lock-panel.ui |  19 ++
 2 files changed, 118 insertions(+), 11 deletions(-)

diff --git a/panels/lock/cc-lock-panel.c b/panels/lock/cc-lock-panel.c
index cab917dd4..3bf00fd94 100644
--- a/panels/lock/cc-lock-panel.c
+++ b/panels/lock/cc-lock-panel.c
@@ -1,6 +1,7 @@
 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
  *
  * Copyright (C) 2018 Red Hat, Inc
+ * Copyright (C) 2020 Collabora Ltd.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -28,17 +29,23 @@
 
 struct _CcLockPanel
 {
-  CcPanel parent_instance;
-
-  GSettings   *lock_settings;
-  GSettings   *notification_settings;
-  GSettings   *session_settings;
-
-  GtkSwitch   *automatic_screen_lock_switch;
-  GtkComboBox *blank_screen_combo;
-  GtkComboBox *lock_after_combo;
-  GtkListBox  *lock_list_box;
-  GtkSwitch   *show_notifications_switch;
+  CcPanelparent_instance;
+
+  GSettings *lock_settings;
+  GSettings *notification_settings;
+  GSettings *privacy_settings;
+  GSettings *session_settings;
+
+  GCancellable  *cancellable;
+
+  GtkSwitch *automatic_screen_lock_switch;
+  GtkComboBox   *blank_screen_combo;
+  GtkComboBox   *lock_after_combo;
+  GtkListBox*lock_list_box;
+  GtkSwitch *show_notifications_switch;
+  GtkSwitch *usb_protection_switch;
+  GDBusProxy*usb_proxy;
+  GtkListBoxRow *usb_protection_row;
 };
 
 CC_PANEL_REGISTER (CcLockPanel, cc_lock_panel)
@@ -178,14 +185,74 @@ on_blank_screen_delay_changed_cb (GtkWidget   *widget,
   g_settings_set_uint (self->session_settings, "idle-delay", value);
 }
 
+static void
+on_usb_protection_props_changed (CcLockPanel *self,
+ GVariant*changed_properties,
+ GStrvinvalidated_properties)
+{
+  gboolean available = FALSE;
+
+  if (self->usb_proxy != NULL)
+{
+  g_autoptr(GVariant) variant = NULL;
+
+  variant = g_dbus_proxy_get_cached_property (self->usb_proxy, "Available");
+  if (variant != NULL)
+available = g_variant_get_boolean (variant);
+}
+
+  /* Show the USB protection row only if the required daemon is up and running */
+  if (available)
+gtk_widget_show (GTK_WIDGET (self->usb_protection_row));
+  else
+gtk_widget_hide (GTK_WIDGET (self->usb_protection_row));
+
+}
+
+static void
+on_usb_protection_param_ready (GObject  *source_object,
+   GAsyncResult *res,
+   gpointer  user_data)
+{
+  CcLockPanel *self;
+  GDBusProxy *proxy;
+  g_autoptr(GError) error = NULL;
+
+  self = user_data;
+  proxy = g_dbus_proxy_new_for_bus_finish (res, &error);
+  if (proxy == NULL)
+{
+  if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+{
+  g_warning ("Failed to connect to SettingsDaemon.UsbProtection: %s",
+ error->message);
+}
+
+  gtk_widget_hide (GTK_WIDGET (self->usb_protection_row));
+  return;
+}
+  self->usb_proxy = proxy;
+
+  g_signal_connect_object (self->usb_proxy,
+   "g-properties-changed",
+   G_CALLBACK (on_usb_protection_props_changed),
+   self,
+   G_CONNECT_SWAPPED);
+  on_usb_protection_props_changed (self, NULL, NULL);
+}
+
+
 static void
 cc_lock_panel_finalize (GObject *object)
 {
   CcLockPanel *self = CC_LOCK_PANEL (object);
 
+  g_cancellable_cancel (self->cancellable);
+  g_clear_object (&self->cancellable);
   g_clear_object (&self->lock_settings);
   g_clear_object (&self->notif

Re: GNOME Foundation AGM 2015

2015-08-06 Thread Tobias Mueller
Heya.

On Thu, Aug 06, 2015 at 01:18:47PM +0200, Frederic Peters wrote:
> Sure; we'll discuss things beforehand and one of us will be there for
> five minutes.
Awesome.  Thanks.
I'd appreciate if you update me once you know who I have to chase up
in time for the AGM ;-)

Thanks,
  Tobi
___
release-team@gnome.org
https://mail.gnome.org/mailman/listinfo/release-team
Release-team lurker? Do NOT participate in discussions.


Re: GNOME Foundation AGM 2015

2015-08-06 Thread Tobias Mueller
Hey folks!

We were thinking that the release-team could and should present at this year's 
AGM.

Could you give a very short presentation (up to five minutes) on what happened 
last year?

Cheers,
  Tobi

On Thu, Aug 06, 2015 at 11:38:59AM +0200, Tobias Mueller wrote:
> Hi everyone.
> 
> Just a reminder about the AGM.  It'll be this
> 
> Saturday, 2015-08-08, at 15:45 Swedish time.
> 
> 
> On Thu, Jul 09, 2015 at 03:28:01PM +0100, Allan Day wrote:
> > The meeting will include reports from each of GNOME's teams
> If your team wants to present anything, please let me know.
> You have up to five minutes.
> 
> If you're intending to have slidesĀ¹, please send them
> to me  until
> 
> Friday, 2015-08-07, 23:59 Swedish time.
> 
> Also please indicate who is going to present on behalf of your team.
> 
> Cheers,
>   Tobi
> 
> 1:  a common format would be good so that we can combine them into one deck.
> ___
> foundation-list mailing list
> foundation-l...@gnome.org
> https://mail.gnome.org/mailman/listinfo/foundation-list
___
release-team@gnome.org
https://mail.gnome.org/mailman/listinfo/release-team
Release-team lurker? Do NOT participate in discussions.