Re: Some help with PolicyKit basics

2009-07-29 Thread Robert Ancell
>> When I run the example program I attached it prompts for a password >> when I press unlock, and each time I activate the GtkEntry (i.e. for >> all D-Bus calls).  I was expecting it to only ask the first time and >> then work for the next n minutes (like sudo).  Is this a configuration >> issue?

Re: Some help with PolicyKit basics

2009-07-28 Thread David Zeuthen
On Tue, 2009-07-28 at 10:00 -0400, David Zeuthen wrote: > I'll add that. OK, I've added this to polkit and polkit-gnome master git repos. I've also added some discussion to the description of PolkitLockButton about this http://hal.freedesktop.org/docs/polkit-gtk/polkit-gtk-1-polkitlockbutton.html

Re: Some help with PolicyKit basics

2009-07-28 Thread David Zeuthen
On Tue, 2009-07-28 at 17:42 +1000, Robert Ancell wrote: > >> - To avoid the client having to enter their password for each D-Bus > >> call the server should maintain a list of authorized D-Bus names. > >> This is safe because D-Bus guarantees these names to be unique > > > > Now, a Mechanism _may_

Re: Some help with PolicyKit basics

2009-07-28 Thread Robert Ancell
>> - To avoid the client having to enter their password for each D-Bus >> call the server should maintain a list of authorized D-Bus names. >> This is safe because D-Bus guarantees these names to be unique > > Now, a Mechanism _may_ cache the results authorization checks but it > really shouldn't u

Return of the annual system bus restart flamewar (Was Re: Some help with PolicyKit basics)

2009-07-27 Thread David Zeuthen
On Mon, 2009-07-27 at 17:58 +0200, Michael Biebl wrote: > 2009/7/27 David Zeuthen : > >> this still true if the d-bus daemon is restarted?) > > > > The system bus daemon should _never ever_ be restarted. The guarantee > > that unique system bus names are _never_ recycled is a good reason why > > th

Re: Some help with PolicyKit basics

2009-07-27 Thread Scott James Remnant
On Mon, 2009-07-27 at 10:39 -0400, David Zeuthen wrote: > The system bus daemon should _never ever_ be restarted. The guarantee > that unique system bus names are _never_ recycled is a good reason why > this is so. > There are plenty of interesting techniques to restart a system daemon while reta

Re: Some help with PolicyKit basics

2009-07-27 Thread Michael Biebl
2009/7/27 David Zeuthen : >> this still true if the d-bus daemon is restarted?) > > The system bus daemon should _never ever_ be restarted. The guarantee > that unique system bus names are _never_ recycled is a good reason why > this is so. I know some distributions still live in some interesting >

Re: Some help with PolicyKit basics

2009-07-27 Thread David Zeuthen
On Mon, 2009-07-27 at 13:07 +1000, Robert Ancell wrote: > Yes, a lock. I think this is required for any configuration dialog as > the UI may not be able to show the configuration until the client is > authorized and the user doesn't want to authorize for each config > change. Not necessarily. I m

Re: Some help with PolicyKit basics

2009-07-27 Thread Robert Ancell
Attaching updated example (works well for me). Please feedback if it is not doing the right calls. I haven't updated it to use the new polkit-gtk button but that will be the next step. 2009/7/27 David Zeuthen : > On Fri, 2009-07-24 at 17:40 +1000, Robert Ancell wrote: >> Hi, >> >> I'm trying to

Re: Some help with PolicyKit basics

2009-07-27 Thread Robert Ancell
That's just what I want!! Thanks! 2009/7/27 David Zeuthen : > On Sun, 2009-07-26 at 16:22 -0400, David Zeuthen wrote: >> Hmm, it might be nice to have library API for doing all this since it is >> rather complicated. Like, we'd have some code in polkit-gobject-1 to do >> the server side bits and

Re: Some help with PolicyKit basics

2009-07-26 Thread Robert Ancell
Thanks David, > The code doesn't really compile without mirror.h... Whoops, attached. Note that the program is not interesting in itself, rather that it is using PK correctly. > First you appear to be mixing the new PolicyKit version with the old one > (the server links against polkit-gobject-1

Re: Some help with PolicyKit basics

2009-07-26 Thread David Zeuthen
On Sun, 2009-07-26 at 16:22 -0400, David Zeuthen wrote: > Hmm, it might be nice to have library API for doing all this since it is > rather complicated. Like, we'd have some code in polkit-gobject-1 to do > the server side bits and maybe a polkit-gtk-1 library for the client > side bits. Unfortunat

Re: Some help with PolicyKit basics

2009-07-26 Thread David Zeuthen
On Fri, 2009-07-24 at 17:40 +1000, Robert Ancell wrote: > Hi, > > I'm trying to learn how to use PolicyKit for configuration of a > server. Find attached a demo program (which I plan to post as a a > tutorial) which does the following: > - Has a server providing a method "Reflect" which reverses

Some help with PolicyKit basics

2009-07-24 Thread Robert Ancell
Hi, I'm trying to learn how to use PolicyKit for configuration of a server. Find attached a demo program (which I plan to post as a a tutorial) which does the following: - Has a server providing a method "Reflect" which reverses a string - Has a client with a text entry that uses that uses the se