<listen> element of the configuration file
Havoc Pennington
hp at redhat.com
Tue Mar 6 11:55:36 PST 2007
Ralf Habacker wrote:
> Havoc Pennington schrieb:
>> Nothing windows-specific here that I see, other than possibly (I don't
>> know) the details of how we invoke the socket APIs.
> Because windows has the same behavior in this manner like unix. The port
> number 0 is routed to the bind call, which indicates the os to use a
> random free socket port.
So we can do the same thing on unix and windows for this, right?
>> I think port=0 should still be disallowed in the text address
>> (instead, the port attribute should be omitted to have the OS choose
>> the port).
> I don't think that this is a good idea, because by default tcp requires
> a host *and* a port parameter and an omitted port attribute currently
> indicates an error, which should no be changed in my opinion. Instead
> setting port=0 indicates that the user knows what he are doing.
port=0 is opaque and unclear unless you know the socket API. "if I leave
out the port, just pick a port" makes sense to me... I don't think
people need to know what they are doing to do this, there's nothing
dangerous about it, at least not more so than using tcp in the first place.
We could allow "port=any" or something like that, but leaving it out
seems just as good to me.
In any case, the important thing is to be sure transport_get_address()
includes the port that was chosen, so the daemon can print its new
address and the port is in DBUS_SESSION_BUS_ADDRESS
Havoc
More information about the dbus
mailing list