Bug#822209: udiskie: Mention something about policykit, possibly in README.Debian

2016-05-10 Thread Faheem Mitha


Hi Gianfranco,

Thanks for the commit.

Regards, Faheem Mitha

On Tue, 10 May 2016, Gianfranco Costamagna wrote:


control: tags -1 pending

Hi, I committed and uploaded this new file a few seconds ago.

I don't think the end user should have privileges to mount/unmount disks, so I 
gave up
in making a polkit file for everybody.

I thought about configuring it, but I don't see how I can do that.

Thanks for now for the README.Debian file, and let me know if you have another 
solution,
I'll happily review it again!

(and sorry for the long wait)

Gianfranco




Il Martedì 26 Aprile 2016 14:09, Faheem Mitha  ha scritto:

On Fri, 22 Apr 2016, Gianfranco Costamagna wrote:


Hi, can you please provide a patch for this?


I can also install a policykit file if needed, just please send a patch

thanks

G.


Hi Gianfranco,

This is the same patch as I posted earlier in
https://github.com/coldfix/udiskie/issues/111

Consider creating a README.Debian with this content. Please feel free to
make modifications as you think appropriate. Or I can make modifications
if you want.

 Regards, Faheem



Note that by default not all udiskie actions may be allowed. You may see
an error like:

GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain: Not
authorized to perform operation

That error means you need to give udiskie addition permissions to perform
whatever actions are necessary. These permissions are governed by
policykit (package `policykit-1` in Debian),

Here is an example. If you run `udiskie-mount` and/or `udiskie-umount`
inside a user cron job, you will need to grant your user additional
permissions for the policykit actions as follows:

1) `org.freedesktop.udisks2.filesystem-mount-other-seat` for when nobody
is logged in and

2) `org.freedesktop.udisks2.filesystem-mount` when somebody is logged into
the system in an active session.

To grant these permissions, you can (for example) create a file called
`/etc/polkit-1/localauthority/50-local.d/10-udiskie.pkla` containing the
following:

```
[udisks2]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.filesystem-mount-other-seat;org.freedesktop.udisks2.filesystem-mount
ResultAny=yes

```
This gives the necessary permissions to all users in the `plugdev` group.
If you wish to only give permissions to a single user, you can replace the
first line with
```
Identity=unix-group:plugdev
```
Note additionally that the policykit version in Debian (for jessie and
later) is 105. The Javascript syntax you will see for Policykit is for
versions 106 and later. The `*.pkla` suffix and the corresponding syntax
is only used for policykit 105 and earlier.




Bug#822209: udiskie: Mention something about policykit, possibly in README.Debian

2016-05-10 Thread Gianfranco Costamagna
control: tags -1 pending

Hi, I committed and uploaded this new file a few seconds ago.

I don't think the end user should have privileges to mount/unmount disks, so I 
gave up
in making a polkit file for everybody.

I thought about configuring it, but I don't see how I can do that.

Thanks for now for the README.Debian file, and let me know if you have another 
solution,
I'll happily review it again!

(and sorry for the long wait)

Gianfranco




Il Martedì 26 Aprile 2016 14:09, Faheem Mitha  ha scritto:

On Fri, 22 Apr 2016, Gianfranco Costamagna wrote:

> Hi, can you please provide a patch for this?
>
>
> I can also install a policykit file if needed, just please send a patch
>
> thanks
>
> G.

Hi Gianfranco,

This is the same patch as I posted earlier in 
https://github.com/coldfix/udiskie/issues/111

Consider creating a README.Debian with this content. Please feel free to 
make modifications as you think appropriate. Or I can make modifications 
if you want.

  Regards, Faheem



Note that by default not all udiskie actions may be allowed. You may see 
an error like:

 GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain: Not
authorized to perform operation

That error means you need to give udiskie addition permissions to perform 
whatever actions are necessary. These permissions are governed by 
policykit (package `policykit-1` in Debian),

Here is an example. If you run `udiskie-mount` and/or `udiskie-umount` 
inside a user cron job, you will need to grant your user additional 
permissions for the policykit actions as follows:

1) `org.freedesktop.udisks2.filesystem-mount-other-seat` for when nobody 
is logged in and

2) `org.freedesktop.udisks2.filesystem-mount` when somebody is logged into 
the system in an active session.

To grant these permissions, you can (for example) create a file called 
`/etc/polkit-1/localauthority/50-local.d/10-udiskie.pkla` containing the 
following:

```
[udisks2]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.filesystem-mount-other-seat;org.freedesktop.udisks2.filesystem-mount
ResultAny=yes

```
This gives the necessary permissions to all users in the `plugdev` group. 
If you wish to only give permissions to a single user, you can replace the 
first line with
```
Identity=unix-group:plugdev
```
Note additionally that the policykit version in Debian (for jessie and 
later) is 105. The Javascript syntax you will see for Policykit is for 
versions 106 and later. The `*.pkla` suffix and the corresponding syntax 
is only used for policykit 105 and earlier.



Bug#822209: udiskie: Mention something about policykit, possibly in README.Debian

2016-04-26 Thread Faheem Mitha


On Fri, 22 Apr 2016, Gianfranco Costamagna wrote:


Hi, can you please provide a patch for this?


I can also install a policykit file if needed, just please send a patch

thanks

G.


Hi Gianfranco,

This is the same patch as I posted earlier in 
https://github.com/coldfix/udiskie/issues/111


Consider creating a README.Debian with this content. Please feel free to 
make modifications as you think appropriate. Or I can make modifications 
if you want.


 Regards, Faheem



Note that by default not all udiskie actions may be allowed. You may see 
an error like:


GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain: Not
authorized to perform operation

That error means you need to give udiskie addition permissions to perform 
whatever actions are necessary. These permissions are governed by 
policykit (package `policykit-1` in Debian),


Here is an example. If you run `udiskie-mount` and/or `udiskie-umount` 
inside a user cron job, you will need to grant your user additional 
permissions for the policykit actions as follows:


1) `org.freedesktop.udisks2.filesystem-mount-other-seat` for when nobody 
is logged in and


2) `org.freedesktop.udisks2.filesystem-mount` when somebody is logged into 
the system in an active session.


To grant these permissions, you can (for example) create a file called 
`/etc/polkit-1/localauthority/50-local.d/10-udiskie.pkla` containing the 
following:

```
[udisks2]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.filesystem-mount-other-seat;org.freedesktop.udisks2.filesystem-mount
ResultAny=yes

```
This gives the necessary permissions to all users in the `plugdev` group. 
If you wish to only give permissions to a single user, you can replace the 
first line with

```
Identity=unix-group:plugdev
```
Note additionally that the policykit version in Debian (for jessie and 
later) is 105. The Javascript syntax you will see for Policykit is for 
versions 106 and later. The `*.pkla` suffix and the corresponding syntax 
is only used for policykit 105 and earlier.




Bug#822209: udiskie: Mention something about policykit, possibly in README.Debian

2016-04-22 Thread Faheem Mitha


On Fri, 22 Apr 2016, Gianfranco Costamagna wrote:


Hi, can you please provide a patch for this?


I can also install a policykit file if needed, just please send a patch

thanks

G.


Hi Gianfranco,

Ok. I filed an issue about this upstream, including a first attempt at a 
patch. Maybe the maintainer has thoughts about it. See 
https://github.com/coldfix/udiskie/issues/111 Feel free to comment if you 
wish.


Regards, Faheem Mitha


Il Venerdì 22 Aprile 2016 3:03, Faheem Mitha  ha scritto:
Package: udiskie
Version: 1.4.9-1
Severity: wishlist

Dear Maintainer,

See the discussion in https://github.com/coldfix/udiskie/issues/102

The upshot is that one needs to allow policykit to give permissions to
udiskie for doing certain things - in this case, cron. Despite what
Jason says, I don't think that cron is a particularly unusual use case
for udiske, and it's been around for a long time.

So one could reasonably say something about policykit, possibly in a
README.Debian, I think.

Regards, Faheem

-- System Information:
Debian Release: 8.4
 APT prefers stable-updates
 APT policy: (500, 'stable-updates'), (500, 'stable'), (50, 'unstable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages udiskie depends on:
ii  gobject-introspection  1.42.0-2.2
ii  python3-docopt 0.6.2-1
ii  python3-gi 3.14.0-1
ii  python3-pkg-resources  5.5.1-1
ii  python3-yaml   3.11-2
pn  python3:any
ii  udisks22.1.7-1

Versions of packages udiskie recommends:
ii  gir1.2-gtk-3.0  3.14.5-1+deb8u1
ii  gir1.2-notify-0.7   0.7.6-2
ii  notification-daemon 0.7.6-2
ii  plasma-widgets-workspace [notification-daemon]  4:4.11.13-2
ii  python3-keyutils0.3.0-3
ii  xfce4-notifyd [notification-daemon] 0.2.4-3

udiskie suggests no packages.

-- debconf-show failed




Bug#822209: udiskie: Mention something about policykit, possibly in README.Debian

2016-04-22 Thread Gianfranco Costamagna
Hi, can you please provide a patch for this?


I can also install a policykit file if needed, just please send a patch

thanks

G.




Il Venerdì 22 Aprile 2016 3:03, Faheem Mitha  ha scritto:
Package: udiskie
Version: 1.4.9-1
Severity: wishlist

Dear Maintainer,

See the discussion in https://github.com/coldfix/udiskie/issues/102

The upshot is that one needs to allow policykit to give permissions to
udiskie for doing certain things - in this case, cron. Despite what
Jason says, I don't think that cron is a particularly unusual use case
for udiske, and it's been around for a long time.

So one could reasonably say something about policykit, possibly in a
README.Debian, I think.

 Regards, Faheem

-- System Information:
Debian Release: 8.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (50, 'unstable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages udiskie depends on:
ii  gobject-introspection  1.42.0-2.2
ii  python3-docopt 0.6.2-1
ii  python3-gi 3.14.0-1
ii  python3-pkg-resources  5.5.1-1
ii  python3-yaml   3.11-2
pn  python3:any
ii  udisks22.1.7-1

Versions of packages udiskie recommends:
ii  gir1.2-gtk-3.0  3.14.5-1+deb8u1
ii  gir1.2-notify-0.7   0.7.6-2
ii  notification-daemon 0.7.6-2
ii  plasma-widgets-workspace [notification-daemon]  4:4.11.13-2
ii  python3-keyutils0.3.0-3
ii  xfce4-notifyd [notification-daemon] 0.2.4-3

udiskie suggests no packages.

-- debconf-show failed



Bug#822209: udiskie: Mention something about policykit, possibly in README.Debian

2016-04-21 Thread Faheem Mitha
Package: udiskie
Version: 1.4.9-1
Severity: wishlist

Dear Maintainer,

See the discussion in https://github.com/coldfix/udiskie/issues/102

The upshot is that one needs to allow policykit to give permissions to
udiskie for doing certain things - in this case, cron. Despite what
Jason says, I don't think that cron is a particularly unusual use case
for udiske, and it's been around for a long time.

So one could reasonably say something about policykit, possibly in a
README.Debian, I think.

 Regards, Faheem

-- System Information:
Debian Release: 8.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (50, 'unstable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages udiskie depends on:
ii  gobject-introspection  1.42.0-2.2
ii  python3-docopt 0.6.2-1
ii  python3-gi 3.14.0-1
ii  python3-pkg-resources  5.5.1-1
ii  python3-yaml   3.11-2
pn  python3:any
ii  udisks22.1.7-1

Versions of packages udiskie recommends:
ii  gir1.2-gtk-3.0  3.14.5-1+deb8u1
ii  gir1.2-notify-0.7   0.7.6-2
ii  notification-daemon 0.7.6-2
ii  plasma-widgets-workspace [notification-daemon]  4:4.11.13-2
ii  python3-keyutils0.3.0-3
ii  xfce4-notifyd [notification-daemon] 0.2.4-3

udiskie suggests no packages.

-- debconf-show failed