[patch] small fixes

John (J5) Palmieri johnp at redhat.com
Tue Oct 24 07:37:27 PDT 2006

On Mon, 2006-10-23 at 19:50 -0400, David Zeuthen wrote:
> On Mon, 2006-10-23 at 18:38 -0400, John (J5) Palmieri wrote:
> > On Mon, 2006-10-23 at 13:27 -0400, David Zeuthen wrote:
> > > On Mon, 2006-10-23 at 12:34 -0400, John (J5) Palmieri wrote:
> > > > Looks good to me.
> > > 
> > > I've committed the patch.
> > > 
> > > >   What about the patch that allows new keys so your
> > > > patch doesn't break 1.0 if we want to backport later?
> > > 
> > > I can do that. How do we want it to look? How about just denying
> > > activation requests if the User key is set?
> > 
> > Really I would have liked a namespaced parser (so we could detect errors
> > in a conf file at the same time allowing extensions) 
> I'm not really sure what that means...

I thought you were modifying the xml conf file.  My mistake.  In a
namespaced parser we could namespace 1.0 tags <dbus1:tag> so any
mistakes could be caught (i.e. <dbus1:tah>) but extensions could be
embedded without causing an error:

  <dbus2:user />

of course mistakes in the namespace would still cause problems but it
does give you some measure of protection while allowing extension.

> > but in any case why
> > would you deny activation requests is the User key is set?
> Because I want to mark it as reserved for future use as it will have
> meaning in 1.2 but will have zero meaning in 1.0. 
> >  I think the
> > idea is to just accept any key (perhaps giving a non-fatal warning for
> > unknown keys).
> Sure, that's the "Be liberal in what you accept" mantra (to which I
> think we all subscribe), however if we don't reserve the "User" key then
> some 3rd party might use it for something and then things will break for
> them in 1.2.
> I also think another idea is to enable people to use the same file for
> both a desktop file and a service, e.g. you could have both [Desktop
> Entry] and [D-BUS Service] in it. Not sure how useful that is though.
> Perhaps the right thing is to ensure only "Name" and "Exec" is set under
> [D-Bus Service] and refuse to activate if that is not the case. Then
> we'll just add "User" for 1.1/1.2 and "SomeOtherKey" in later releases
> etc. etc.
> Or maybe we don't need to do anything; if people abuse the .service
> files to put other meta data under the [D-Bus Service] section perhaps
> they deserve to lose as that's a pretty bad idea unless they prefix it
> with e.g. X-GNOME-blah or whatever.

If someone uses a keyword we later reserve without going through us it
is not our problem.  We already have an understanding that user will be
used (sorry for the pun).   

John (J5) Palmieri <johnp at redhat.com>

More information about the dbus mailing list