Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb42415' into 'master'
[udisks2] Loosen up polkit rules to work from another seat. Contributes to JB#42415

See merge request mer-core/udisks2!15
  • Loading branch information
rainemak committed Sep 26, 2018
2 parents aabf7d9 + 7c3a440 commit 2713dd2
Show file tree
Hide file tree
Showing 12 changed files with 133 additions and 136 deletions.
@@ -1,7 +1,7 @@
From eed3d5281b6dec96c8d9ca137b21a0c7fe7bb99a Mon Sep 17 00:00:00 2001
From d80468db70396c4bf9046d3b6c0842376df98476 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Tue, 5 Dec 2017 11:17:50 +0200
Subject: [PATCH 01/10] Disable libblockdev-mdraid and part support from source
Subject: [PATCH 1/8] Disable libblockdev-mdraid and part support from source
tree

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
Expand Down
4 changes: 2 additions & 2 deletions rpm/0002-Drop-smartata-dependencies.patch
@@ -1,7 +1,7 @@
From a74354efa70a5e5578e581e1e3a6df5d4fa1b2d2 Mon Sep 17 00:00:00 2001
From fce6c2b7904eec9fbb4be5151178bc923d509ed3 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Thu, 7 Dec 2017 13:15:34 +0200
Subject: [PATCH 02/10] Drop smartata dependencies
Subject: [PATCH 2/8] Drop smartata dependencies

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
Expand Down
54 changes: 0 additions & 54 deletions rpm/0003-Loosen-up-mount-unmount-rights.patch

This file was deleted.

116 changes: 116 additions & 0 deletions rpm/0003-Loosen-up-polkit-policies-to-work-from-another-seat.patch
@@ -0,0 +1,116 @@
From 43e2067c1e2df252e44b795a06773992c42be82d Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Tue, 6 Feb 2018 14:01:16 +0200
Subject: [PATCH 3/8] Loosen up polkit policies to work from another seat

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
data/org.freedesktop.UDisks2.policy.in | 36 +++++++++++++-------------
1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/data/org.freedesktop.UDisks2.policy.in b/data/org.freedesktop.UDisks2.policy.in
index d97528d4..eaf13908 100644
--- a/data/org.freedesktop.UDisks2.policy.in
+++ b/data/org.freedesktop.UDisks2.policy.in
@@ -16,8 +16,8 @@
<_description>Mount a filesystem</_description>
<_message>Authentication is required to mount the filesystem</_message>
<defaults>
- <allow_any>auth_admin</allow_any>
- <allow_inactive>auth_admin</allow_inactive>
+ <allow_any>yes</allow_any>
+ <allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>
@@ -29,7 +29,7 @@
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
- <allow_active>auth_admin_keep</allow_active>
+ <allow_active>auth_self_keep</allow_active>
</defaults>
</action>

@@ -38,9 +38,9 @@
<_description>Mount a filesystem from a device plugged into another seat</_description>
<_message>Authentication is required to mount the filesystem</_message>
<defaults>
- <allow_any>auth_admin</allow_any>
- <allow_inactive>auth_admin</allow_inactive>
- <allow_active>auth_admin_keep</allow_active>
+ <allow_any>yes</allow_any>
+ <allow_inactive>yes</allow_inactive>
+ <allow_active>yes</allow_active>
</defaults>
</action>

@@ -63,9 +63,9 @@
<_description>Unmount a device mounted by another user</_description>
<_message>Authentication is required to unmount a filesystem mounted by another user</_message>
<defaults>
- <allow_any>auth_admin</allow_any>
- <allow_inactive>auth_admin</allow_inactive>
- <allow_active>auth_admin_keep</allow_active>
+ <allow_any>yes</allow_any>
+ <allow_inactive>yes</allow_inactive>
+ <allow_active>yes</allow_active>
</defaults>
</action>

@@ -102,7 +102,7 @@
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
- <allow_active>auth_admin_keep</allow_active>
+ <allow_active>auth_self_keep</allow_active>
</defaults>
</action>

@@ -111,9 +111,9 @@
<_description>Unlock an encrypted device plugged into another seat</_description>
<_message>Authentication is required to unlock an encrypted device</_message>
<defaults>
- <allow_any>auth_admin</allow_any>
- <allow_inactive>auth_admin</allow_inactive>
- <allow_active>auth_admin_keep</allow_active>
+ <allow_any>auth_self</allow_any>
+ <allow_inactive>auth_self</allow_inactive>
+ <allow_active>auth_self_keep</allow_active>
</defaults>
</action>

@@ -319,7 +319,7 @@
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
- <allow_active>auth_admin_keep</allow_active>
+ <allow_active>auth_self_keep</allow_active>
</defaults>
</action>

@@ -328,9 +328,9 @@
<_description>Modify a device</_description>
<_message>Authentication is required to modify a device plugged into another seat</_message>
<defaults>
- <allow_any>auth_admin</allow_any>
- <allow_inactive>auth_admin</allow_inactive>
- <allow_active>auth_admin_keep</allow_active>
+ <allow_any>auth_self</allow_any>
+ <allow_inactive>auth_self</allow_inactive>
+ <allow_active>auth_self_keep</allow_active>
</defaults>
</action>

@@ -384,7 +384,7 @@
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
- <allow_active>auth_admin</allow_active>
+ <allow_active>auth_self</allow_active>
</defaults>
</action>

--
2.17.1

@@ -1,7 +1,7 @@
From 25b0331b27801f54e24aba4b21738309ebf05062 Mon Sep 17 00:00:00 2001
From 238885252bcc61b33b04e7b2f35386cd1654216e Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Tue, 6 Feb 2018 14:08:59 +0200
Subject: [PATCH 04/10] Introduce mount-sd service that is executed as nemo
Subject: [PATCH 4/8] Introduce mount-sd service that is executed as nemo

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
Expand Down
4 changes: 2 additions & 2 deletions rpm/0005-Add-udev-rule-for-the-sda-drives.patch
@@ -1,7 +1,7 @@
From d6088c3ab42931929dbd0bb6fa6cf3e6706d8499 Mon Sep 17 00:00:00 2001
From 1d81016ef437b5d46f460b896570aecbb7cdc283 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Mon, 12 Mar 2018 10:18:03 +0200
Subject: [PATCH 05/10] Add udev rule for the sda drives
Subject: [PATCH 5/8] Add udev rule for the sda drives

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
Expand Down
4 changes: 2 additions & 2 deletions rpm/0006-Disable-zram-rule-for-now.patch
@@ -1,7 +1,7 @@
From 1020693fef82bb586fbcc4c85356cf6d832564d8 Mon Sep 17 00:00:00 2001
From a47bdb65dce36e359fd160a6b2612f650464d501 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Wed, 11 Apr 2018 11:11:53 +0300
Subject: [PATCH 06/10] Disable zram rule for now
Subject: [PATCH 6/8] Disable zram rule for now

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
Expand Down
4 changes: 2 additions & 2 deletions rpm/0007-Create-mount-path-with-755-rights.patch
@@ -1,7 +1,7 @@
From c7b6cc4dda761baf5d7ba1c9657c9728dc75ec97 Mon Sep 17 00:00:00 2001
From 25d40682c8393178112ca1f3e8630f90184ce84a Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Wed, 18 Apr 2018 18:00:00 +0300
Subject: [PATCH 07/10] Create mount path with 755 rights
Subject: [PATCH 7/8] Create mount path with 755 rights

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
Expand Down
@@ -1,7 +1,7 @@
From 18963bbaf1422255f24f3d71bc96733083d60e5c Mon Sep 17 00:00:00 2001
From 6f14b8f50eb50a20e8cd20e8fc07f7e3a03fd0b4 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Tue, 18 Sep 2018 17:04:36 +0300
Subject: [PATCH 10/10] Make it possible to encrypt mmcblk* (format with
Subject: [PATCH 8/8] Make it possible to encrypt mmcblk* (format with
encryption)

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
Expand Down

This file was deleted.

30 changes: 0 additions & 30 deletions rpm/0009-Make-it-possible-to-unlock-from-another-seat.patch

This file was deleted.

10 changes: 3 additions & 7 deletions rpm/udisks2.spec
Expand Up @@ -16,14 +16,12 @@ Source0: %{name}-%{version}.tar.bz2
Source1: udisks2-symlink-mount-path
Patch1: 0001-Disable-libblockdev-mdraid-and-part-support-from-sou.patch
Patch2: 0002-Drop-smartata-dependencies.patch
Patch3: 0003-Loosen-up-mount-unmount-rights.patch
Patch3: 0003-Loosen-up-polkit-policies-to-work-from-another-seat.patch
Patch4: 0004-Introduce-mount-sd-service-that-is-executed-as-nemo.patch
Patch5: 0005-Add-udev-rule-for-the-sda-drives.patch
Patch6: 0006-Disable-zram-rule-for-now.patch
Patch7: 0007-Create-mount-path-with-755-rights.patch
Patch8: 0008-Make-it-possible-to-format-from-another-seat.-Fixes-.patch
Patch9: 0009-Make-it-possible-to-unlock-from-another-seat.patch
Patch10: 0010-Make-it-possible-to-encrypt-mmcblk-format-with-encry.patch
Patch8: 0008-Make-it-possible-to-encrypt-mmcblk-format-with-encry.patch

BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gobject-introspection-1.0)
Expand Down Expand Up @@ -114,9 +112,7 @@ dynamic library, which provides access to the udisksd daemon.
%patch5 -p1 -b .udev-rules-for-sda
%patch6 -p1 -b .udev-disable-zram
%patch7 -p1 -b .mount-path-rights
%patch8 -p1 -b .format-another-seat
%patch9 -p1 -b .unlock-another-seat
%patch10 -p1 -b .mmcblk-encryption
%patch8 -p1 -b .mmcblk-encryption

%build
# Disable gtk-doc
Expand Down

0 comments on commit 2713dd2

Please sign in to comment.