[gdm/fix-jump-back-to-login-screen: 21/21] data: Disable network configuration on login screen
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/fix-jump-back-to-login-screen: 21/21] data: Disable network configuration on login screen
- Date: Tue, 22 Mar 2022 14:41:13 +0000 (UTC)
commit d4dd963f68b5f76bfd460aa733781c38bd9710b6
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Jun 8 20:45:00 2021 +0200
data: Disable network configuration on login screen
data/meson.build | 10 ++++++++++
data/org.gnome.gdm.rules.in | 8 ++++++++
2 files changed, 18 insertions(+)
---
diff --git a/data/meson.build b/data/meson.build
index 7c5222eaf..20d39a366 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -157,6 +157,16 @@ gdm_rules = configure_file(
install_dir: udev_dir,
)
+# Polkit rules
+polkit_rules = configure_file(
+ input: 'org.gnome.gdm.rules.in',
+ output: '@BASENAME@',
+ configuration: {
+ 'GDM_USERNAME': get_option('user'),
+ },
+ install_dir: get_option('datadir') / 'polkit-1' / 'rules.d',
+)
+
# DBus service files
service_config = configuration_data()
service_config.set('sbindir', gdm_prefix / get_option('sbindir'))
diff --git a/data/org.gnome.gdm.rules.in b/data/org.gnome.gdm.rules.in
new file mode 100644
index 000000000..09544f11e
--- /dev/null
+++ b/data/org.gnome.gdm.rules.in
@@ -0,0 +1,8 @@
+polkit.addRule(function(action, subject) {
+ if (action.id == "org.freedesktop.NetworkManager.network-control" &&
+ subject.user == "@GDM_USERNAME@") {
+ return polkit.Result.NO;
+ }
+
+ return polkit.Result.NOT_HANDLED;
+});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]