Name or Names in service files? (Disconnect between the spec and our implementation)

Havoc Pennington hp at redhat.com
Wed Dec 6 10:59:41 PST 2006


Alexander Larsson wrote:
> I'm working on gvfs, a gnome-vfs replacement. It uses a "herd of
> daemons" approach, where it generally split things up such that each
> mount is handled by its own daemon (although its possible to merge
> several mounts into one daemon. For instance, the smb backend would have
> a daemon for each server+share tuple.
> 
> Consider the mount operation here. We need to spawn a daemon and then
> talk to it, making sure we only spawn one such process per server+share
> tuple. This sounds almost ideal for dbus activation, one would just
> activate the "org.gtk.vfs.smb.<server>.<share>" bus name. Unfortunately
> there is no way to specify this as a template for a single binary, so
> instead the gvfs code has to do the spawning, etc.
> 

Ah OK, so it's a "factory" model - "create me the process to handle 
server.share"

The wildcard does seem like a pretty clean solution, as long as it's OK 
to spawn an arbitrary number of these processes without validating the 
exact name first. There might be a problem using this on the system bus, 
because anyone could start an arbitrary number of these processes as the 
gvfs user, and also we'd have to adapt the security policy stuff to work 
in this case (right now you need to specify a particular bus name).

Havoc



More information about the dbus mailing list