summaryrefslogtreecommitdiffstats
path: root/bus
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2007-06-13 20:52:58 +0000
committerHavoc Pennington <hp@redhat.com>2007-06-13 20:52:58 +0000
commit72697649524238bd8389670e71c9faa55b7b4a1a (patch)
treee6c3ad0d6b7070e8f0cfd00231a5bbad739bb363 /bus
parente3d30a03225dd1d26012ecd39b09e4ccf91befb5 (diff)
2007-06-13 Havoc Pennington <hp@redhat.com>
* dbus/dbus-server-socket.c (_dbus_server_listen_socket): support all_interfaces=true|false for tcp servers * dbus/dbus-sysdeps-unix.c (_dbus_listen_tcp_socket): support inaddr_any flag * bus/selinux.c: fix some missing includes * dbus/dbus-server-socket.c (_dbus_server_listen_socket): allow port to simply be omitted in addition to specifying 0
Diffstat (limited to 'bus')
-rw-r--r--bus/dbus-daemon.1.in15
-rw-r--r--bus/selinux.c3
2 files changed, 15 insertions, 3 deletions
diff --git a/bus/dbus-daemon.1.in b/bus/dbus-daemon.1.in
index a657d285..ce623f8b 100644
--- a/bus/dbus-daemon.1.in
+++ b/bus/dbus-daemon.1.in
@@ -221,13 +221,22 @@ the last address given in <listen> first. That is,
apps will try to connect to the last <listen> address first.
.PP
-A special case is using a port number of zero which means to
-pick up a random free port. The real used port number could be retrieved
-by using the --print-address command line parameter.
+A special case is using a port number of zero (or omitting the port),
+which means to choose an available port selected by the operating
+system. The port number chosen can be with the --print-address command
+line parameter and will be present in other cases where the server
+reports its own address, such as when DBUS_SESSION_BUS_ADDRESS is set.
.PP
Example: <listen>tcp:host=localhost,port=0</listen>
+.PP
+tcp addresses also allow an all_interfaces=true option, which will
+cause the bus to listen on all local address (INADDR_ANY) and not only
+the specified host. However, the specified host will still be used as
+the reported address of the server. The specified host should be a
+valid name of the local machine or weird stuff will happen.
+
.TP
.I "<auth>"
diff --git a/bus/selinux.c b/bus/selinux.c
index c2138380..a37e367a 100644
--- a/bus/selinux.c
+++ b/bus/selinux.c
@@ -29,6 +29,8 @@
#include "config-parser.h"
#ifdef HAVE_SELINUX
+#include <sys/types.h>
+#include <unistd.h>
#include <errno.h>
#include <pthread.h>
#include <syslog.h>
@@ -38,6 +40,7 @@
#include <selinux/flask.h>
#include <signal.h>
#include <stdarg.h>
+#include <stdio.h>
#ifdef HAVE_LIBAUDIT
#include <libaudit.h>
#endif /* HAVE_LIBAUDIT */