« first day (2019 days earlier)      last day (2950 days later) » 

2:50 PM
Hi. Would it make sense to have the Debian udiskie package contain a polkit file such as the one described in github.com/coldfix/udiskie/wiki/Permissions?
 
3:10 PM
The storage group does not exist. Should I use another group?
I'm wondering whether I could/should use the backup group for this.
 
 
6 hours later…
8:54 PM
@FaheemMitha what are you talking about?
 
9:13 PM
@derobert Sorry, I guess I'm not being clear.
 
polkit shudder
 
@derobert Is it part of the unholy Church of the Systemd?
 
@FaheemMitha no, worse, I think it's in bed with GNOME.
 
@derobert Oh the horror.
 
though everyone uses it now
 
9:22 PM
@derobert The udiskie maintainer kindly gave me a pointer.
Do you happen to know the correct way to restart polkit? I've been trying systemctl restart polkitd.service, but it doesn't give any signs that anything has happened.
 
@FaheemMitha that should do it... not sure you even need to...
 
Is this just me, or is trying to stop people mounting and unmounting devices in cron symtoms of a misplaced sense of security?
Another trivial question. If I do set -e bash echoes everything. But it is echoing to standard output?
 
@FaheemMitha well, polkit is tied to sessions, and cron isn't part of your session... it's idea is that the person physically seated at the machine should be allowed to do certain things
 
@derobert It just makes life more complicated. I mean, I'm all for security, but one should draw the line somewhere. I'm just trying to get this freaking backup working.
I may have to move to Windows. Or OS X.
 
@FaheemMitha making life more complicated is what polkit does... :-/
hence the shudder
 
9:32 PM
@derobert If I wanted complicated, I'd use SELinux.
 
@FaheemMitha make life simple! fvwm95 4ever!
:-p
 
@derobert The window manager?
That tip doesn't seem to be working. I'm getting nothing in the logs...
 
I don't think you can use the javascript polkit syntax... Debian doesn't use a new enough version in Jessie, if I remember correctly.
 
@derobert Which part is in JS polkit syntax? All of it?
 
polkit.addRule(function(action, subject) {
  var prefix = "org.freedesktop.udisks";
  if (action.id.slice(0, prefix.length) == prefix)
    polkit.log(action.id);
});
... that is JavaScript
 
9:39 PM
@derobert I see. Shouldn't it throw an error or something?
 
I don't know. I try to stay as far away from polkit as possible. For safety.
 
@derobert I'd like to do that. But do I have the option?
 
@FaheemMitha yeah, just do your mount with sudo :-P
 
Maybe I should try taking a stern tone with my computer. I shall tell it I shall brook none of this nonsense.
@derobert Not sure what you mean.
 
@FaheemMitha dpkg --purge --force-depends policykit-1 seldom goes well, unfortunately.
 
9:43 PM
@derobert I believe you.
 
@FaheemMitha sudo mount /dev/whatever /path works just fine from cron. At least if you set it up as NOPASSWD in sudoers.
 
I notice I'm not getting any comments or answers. And hardly any views. <sobs>
 
sudo udisksctl ... will too, as root will have permission
 
@derobert Oh, you mean tell udisks to take a running jump?
 
... if you just want to get it to work... :-/
 
9:45 PM
In other words, just do it manually?
@derobert Yes, it's good when things work.
I'm generally pro things working.
 
github.com/derobert/Westerley-Pool/blob/master/integration/… .... that's all I know about getting udisks2 to let a user mount disks...
 
But I don't need to run sudo to get it to mount. Just allow mounting by users.
That would be your apartment complex pool app thingy?
 
yep. the web app (running as its own user) mounts disks to do backups to them
 
@derobert Ah, so you are actually doing things with policykit. How brave of you.
 
yes, and it actually works...
 
9:48 PM
If pkit doesn't recognize JS, that could explain the issue. But why accept JS syntax in the first place?
That is some old syntax?
 
JS syntax is the new syntax. Jessie doesn't do it,
I have no idea why they picked JS.
 
@derobert Maybe they are worshippers of Satan.
I'll tell Thomas G.
Gosh, this is so much fun.
 
Yeah! Upgrading Wheezy→Jessie, I get to reconfigure Apache! Joy!
 
Is the code in github.com/coldfix/udiskie/wiki/Permissions also in JS syntax?
 
@FaheemMitha top one is, bottom isn't
 
9:53 PM
@derobert Actually, I think I started using udiskie because there was some problem mounting NTFS filesystems on jessie.
I never did quite figure it out... But udisks seems to be able to cope, regular mounting doesn't.
@derobert They look pretty similar.
 
@FaheemMitha I hope that's sarcastic .... :-/
 
To be clear github.com/coldfix/udiskie/wiki/Permissions is not in JS syntax, right?
 
polkit.addRule(function(action, subject) { is the JS one
 
@derobert Definitely not sarcastic. I have no idea what JS looks like.
 
ah...
 
9:56 PM
I.e. it starts with:
polkit.addRule(function(action, subject) {
 
polkit.addRule(function(action, subject) { … }) is a JS function call, passing it an anonymous (lambda) function...
@FaheemMitha yep, it has the older syntax at the bottom of the page though.
 
It talks about "polkit's predecessor PolicyKit"
So is jessie running PolicyKit?
 
yep
or at least close enough
 
Package: policykit-1
Version: 0.105-8
Installed-Size: 149
Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
Architecture: amd64
Depends: libc6 (>= 2.7), libglib2.0-0 (>= 2.37.3), libpam0g (>= 0.99.7.1), libpolkit-agent-1-0 (>= 0.105), libpolkit-backend-1-0 (>= 0.99), libpolkit-gobject-1-0 (>= 0.101), libpam-systemd, dbus
Breaks: gdm3 (<< 3.8.4-7~)
Description-en: framework for managing administrative policies and privileges
PolicyKit is an application-level toolkit for defining and handling the policy
But they seems to be using PolicyKit and polkit interchangably here. My head may explode.
 
@FaheemMitha As long as you're still up to no good, it's all OK :-P
 
10:02 PM
@derobert Yes, that's what I'm up to.
Hmm, do I know how to "inset the correct action names"?
Yes, it actually doesn't look that complicated.
 
@FaheemMitha ummmm.... I believe there is a udisks2 file somewhere describing what action names it uses..
 
@derobert Incidentally, are you a Frasier fan?
 
Never watched it
 
@derobert Ah.
I have a theory that it actually takes place in a different universe.
You notice they never show the sky? That universe probably has two moons.
 
10:18 PM
I think it's time to go home. Apache can remain broken until tomorrow.
 
10:31 PM
@derobert Have a good evening. Thanks for the help.
 
11:31 PM
@JeffSchaller (You were the one who thought I considered too many programming questions off-topic, right?) I'm not voting to migrate this question because it's about finding documentation, not about programming per se.
It is a borderline case, I don't really mind if it does get migrated.
 
11:53 PM
@Gilles It's possible that I thought so; I don't trust my memory much, unless it's written down somewhere besides my neurons. A random program snippet could define a constant anywhere internally, if not in 30 levels of #includes. I didn't like the question because it showed lack of effort, but put the comment there in the hopes that it would be enough to show them a path for future curiosities. I think a programmer's forum might have better tools for a more-general solution.
 

« first day (2019 days earlier)      last day (2950 days later) »